Specify expire_on_commit for tailbone db session

is this right..?  seems to be necessary for login now, in some
cases.. which surely doesn't make sense
This commit is contained in:
Lance Edgar 2017-08-08 19:38:54 -05:00
parent c40a993273
commit 33a9516042

View file

@ -35,7 +35,7 @@ from rattail.db import SessionBase
from rattail.db.continuum import versioning_manager
Session = scoped_session(sessionmaker(class_=SessionBase, rattail_config=None, rattail_record_changes=False))
Session = scoped_session(sessionmaker(class_=SessionBase, rattail_config=None, rattail_record_changes=False, expire_on_commit=False))
# not necessarily used, but here if you need it
TempmonSession = scoped_session(sessionmaker())