From b7b171675c16e2cf719f447994688ed37e007423 Mon Sep 17 00:00:00 2001 From: Mattias Granlund Date: Mon, 24 Nov 2014 22:13:27 +0200 Subject: [PATCH] Fix bug to allow multiple instances of extension. --- flask_mongoengine/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flask_mongoengine/__init__.py b/flask_mongoengine/__init__.py index 47683937..3ea7ef4a 100644 --- a/flask_mongoengine/__init__.py +++ b/flask_mongoengine/__init__.py @@ -94,8 +94,8 @@ def init_app(self, app, config=None): # Store objects in application instance so that multiple apps do # not end up accessing the same objects. - app.extensions['mongoengine'] = {self: {'app': app, - 'conn': connection}} + app.extensions['mongoengine'][self] = {'app': app, + 'conn': connection} @property def connection(self):