From 9f72bf3a6ac843082965931b33fff77a1ca8bc94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Stach?= Date: Fri, 9 Oct 2026 22:11:08 +0200 Subject: [PATCH] fix: add expire_on_commit=False to sessionmaker Co-authored-by: aider (openrouter/thinkingmachines/inkling-small:free) --- backend/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app.py b/backend/app.py index 7e52b62..a8cfbab 100644 --- a/backend/app.py +++ b/backend/app.py @@ -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):