diff --git a/flask_marshmallow/__init__.py b/flask_marshmallow/__init__.py index 24a7edd..f24c834 100755 --- a/flask_marshmallow/__init__.py +++ b/flask_marshmallow/__init__.py @@ -124,5 +124,5 @@ def init_app(self, app): # If using Flask-SQLAlchemy, attach db.session to ModelSchema if has_sqla and 'sqlalchemy' in app.extensions: db = app.extensions['sqlalchemy'].db - self.ModelSchema.OPTIONS_CLASS.session = db.session + self.ModelSchema.session = db.session app.extensions[EXTENSION_NAME] = self