We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01632e2 commit a67585cCopy full SHA for a67585c
1 file changed
src/app/api/v1/posts.py
@@ -24,7 +24,8 @@ async def write_post(
24
current_user: Annotated[dict, Depends(get_current_user)],
25
db: Annotated[AsyncSession, Depends(async_get_db)],
26
) -> PostRead:
27
- db_user = await crud_users.get(db=db, username=username, is_deleted=False, schema_to_select=UserRead)
+ db_user = await crud_users.get(db=db, username=username, is_deleted=False, schema_to_select=UserRead,
28
+ return_as_model=True)
29
if db_user is None:
30
raise NotFoundException("User not found")
31
0 commit comments