fix: fix expire on commit session
Browse files
src/db.py
CHANGED
|
@@ -16,7 +16,7 @@ engine = create_engine(
|
|
| 16 |
connect_args={"check_same_thread": False},
|
| 17 |
pool_pre_ping=True,
|
| 18 |
)
|
| 19 |
-
SessionLocal = sessionmaker(bind=engine, autoflush=False, autocommit=False)
|
| 20 |
Base = declarative_base()
|
| 21 |
|
| 22 |
class User(Base):
|
|
|
|
| 16 |
connect_args={"check_same_thread": False},
|
| 17 |
pool_pre_ping=True,
|
| 18 |
)
|
| 19 |
+
SessionLocal = sessionmaker(bind=engine, autoflush=False, autocommit=False, expire_on_commit=False)
|
| 20 |
Base = declarative_base()
|
| 21 |
|
| 22 |
class User(Base):
|