mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-08-26 16:40:40 +03:00
format code
This commit is contained in:
parent
060bdb65fe
commit
93f2e66bd0
@ -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(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user