fix: add expire_on_commit=False to sessionmaker
Co-authored-by: aider (openrouter/thinkingmachines/inkling-small:free) <aider@aider.chat>
This commit is contained in:
1 parent
d65f84c3e5
commit
9f72bf3a6a
1 file changed
+1
-1
+1
-1
@@ -7,7 +7,7 @@ import os
|
||||
|
||||
DATABASE_URL = "sqlite:///./backend/golf.db"
|
||||
engine = create_engine(DATABASE_URL, connect_args={"check_same_thread": False})
|
||||
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
||||
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine, expire_on_commit=False)
|
||||
Base = declarative_base()
|
||||
|
||||
class User(Base):
|
||||
|
||||
Reference in new issue
Block a user