Specify expire_on_commit for rattail db sessions

apparently we need to do that sometimes? always? i surely need to
understand this better..
This commit is contained in:
Lance Edgar 2017-08-08 19:37:45 -05:00
parent 1b3886443a
commit aa3ff792a2

View file

@ -87,7 +87,8 @@ if sqlalchemy:
self.continuum_user = user self.continuum_user = user
Session = orm.sessionmaker(class_=SessionBase, rattail_config=None, rattail_record_changes=False) Session = orm.sessionmaker(class_=SessionBase, rattail_config=None, rattail_record_changes=False, expire_on_commit=False)
else: # no sqlalchemy else: # no sqlalchemy
Session = None Session = None