Fix door check db session
This commit is contained in:
@@ -13,6 +13,9 @@ def get_session():
|
||||
with Session(engine) as db:
|
||||
yield db
|
||||
|
||||
def get_db_session():
|
||||
return Session(engine)
|
||||
|
||||
def add_and_refresh(db: Session, obj):
|
||||
db.add(obj)
|
||||
db.commit()
|
||||
|
||||
Reference in New Issue
Block a user