Skip to content

Commit 253f775

Browse files
authored
Merge pull request #154 from grillazz/152-implement-acyncpg-coon-pool-poc
- fix
2 parents 5ad75cb + e7b24d5 commit 253f775

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/api/stuff.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ async def find_stuff_pool(
8181
try:
8282
stmt = await Stuff.find(db_session, name, compile_sql=True)
8383
result = await request.app.postgres_pool.fetchrow(str(stmt))
84-
result = dict(result)
8584
except SQLAlchemyError as ex:
8685
raise HTTPException(
8786
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, detail=repr(ex)
@@ -91,7 +90,7 @@ async def find_stuff_pool(
9190
status_code=status.HTTP_404_NOT_FOUND,
9291
detail=f"Stuff with name {name} not found.",
9392
)
94-
return result
93+
return dict(result)
9594

9695

9796
@router.delete("/{name}")

0 commit comments

Comments
 (0)