Skip to content
Snippets Groups Projects
Commit 7f7a9756 authored by Kevin Morris's avatar Kevin Morris
Browse files

remove autoflush from aurweb.db.Session


This causes issues with the declarative API.

Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
parent 4f09e939
No related branches found
No related tags found
1 merge request!71Use SQLAlchemy Declarative API for ORM Models
......@@ -141,7 +141,7 @@ def get_engine(echo: bool = False):
engine = create_engine(get_sqlalchemy_url(),
connect_args=connect_args,
echo=echo)
Session = sessionmaker(autocommit=False, autoflush=True, bind=engine)
Session = sessionmaker(autocommit=False, autoflush=False, bind=engine)
session = Session()
return engine
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment