format code

This commit is contained in:
grillazz 2025-07-29 17:33:17 +02:00
parent 060bdb65fe
commit 93f2e66bd0

View File

@ -28,7 +28,8 @@ class Base(DeclarativeBase):
try: try:
db_session.add(self) db_session.add(self)
await db_session.commit() await db_session.commit()
return await db_session.refresh(self) await db_session.refresh(self)
return self
except SQLAlchemyError as ex: except SQLAlchemyError as ex:
await logger.aerror(f"Error inserting instance of {self}: {repr(ex)}") await logger.aerror(f"Error inserting instance of {self}: {repr(ex)}")
raise HTTPException( raise HTTPException(