Files
arrr-erp/app/core/db/deps.py
T
2026-06-20 15:01:44 +05:30

11 lines
258 B
Python

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()