From 79dba0b52a90e8ba817f033ab8d2837c759bcba3 Mon Sep 17 00:00:00 2001 From: Antony Gelberg Date: Sat, 19 Jan 2019 01:29:53 +0200 Subject: [PATCH] Use ModelSchema.session setter rather than OPTIONS_CLASS --- flask_marshmallow/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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