Prepare ERP source for Gitea deployment
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
from typing import Generator
|
||||
from sqlalchemy.orm import Session
|
||||
from app.core.db.common import CommonSessionLocal
|
||||
|
||||
def get_common_db() -> Generator[Session, None, None]:
|
||||
db = CommonSessionLocal()
|
||||
try:
|
||||
yield db
|
||||
finally:
|
||||
db.close()
|
||||
Reference in New Issue
Block a user