Skip to content

Commit

Permalink
fix: Move objproxies import in test branch (#7058)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamareebjamal authored Jun 11, 2020
1 parent ab4d152 commit 8f62b87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import sys

from flask_sqlalchemy import SQLAlchemy
from objproxies import CallbackProxy
from sqlalchemy_continuum import make_versioned
from sqlalchemy_continuum.plugins import FlaskPlugin

Expand All @@ -13,5 +12,6 @@
# to a nested transaction which is rolled backed
# after each test
if 'pytest' in sys.modules:
from objproxies import CallbackProxy
db._session = db.session
db.session = CallbackProxy(lambda: db._session)

0 comments on commit 8f62b87

Please sign in to comment.