🐛 fix(base.py): use db_manager.engine instead of DatabaseManager.engine to access the database engine
🐛 fix(conftest.py): add TYPE_CHECKING import to fix type hinting error 🐛 fix(conftest.py): pass db_manager to blank_session_getter fixture to fix session creation error
This commit is contained in:
parent
df51f7879c
commit
a9db2da6bf
2 changed files with 8 additions and 5 deletions
|
|
@ -70,7 +70,7 @@ class DatabaseManager(Service):
|
|||
@contextmanager
|
||||
def session_getter(db_manager: DatabaseManager):
|
||||
try:
|
||||
session = Session(DatabaseManager.engine)
|
||||
session = Session(db_manager.engine)
|
||||
yield session
|
||||
except Exception as e:
|
||||
print("Session rollback because of exception:", e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue