mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-08-26 16:40:40 +03:00
- fix
This commit is contained in:
parent
c8efc0596c
commit
e7b24d5d7e
@ -81,7 +81,6 @@ async def find_stuff_pool(
|
||||
try:
|
||||
stmt = await Stuff.find(db_session, name, compile_sql=True)
|
||||
result = await request.app.postgres_pool.fetchrow(str(stmt))
|
||||
result = dict(result)
|
||||
except SQLAlchemyError as ex:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, detail=repr(ex)
|
||||
@ -91,7 +90,7 @@ async def find_stuff_pool(
|
||||
status_code=status.HTTP_404_NOT_FOUND,
|
||||
detail=f"Stuff with name {name} not found.",
|
||||
)
|
||||
return result
|
||||
return dict(result)
|
||||
|
||||
|
||||
@router.delete("/{name}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user