mirror of https://github.com/stijndcl/didier
Fix typing
parent
152f84ed1c
commit
149d132e6d
|
@ -40,8 +40,8 @@ async def delete_bookmark_by_id(session: AsyncSession, user_id: int, bookmark_id
|
||||||
|
|
||||||
This fails if you don't own this bookmark
|
This fails if you don't own this bookmark
|
||||||
"""
|
"""
|
||||||
statement = select(Bookmark).where(Bookmark.bookmark_id == bookmark_id)
|
select_statement = select(Bookmark).where(Bookmark.bookmark_id == bookmark_id)
|
||||||
bookmark = (await session.execute(statement)).scalar_one_or_none()
|
bookmark = (await session.execute(select_statement)).scalar_one_or_none()
|
||||||
|
|
||||||
# No bookmark with this id
|
# No bookmark with this id
|
||||||
if bookmark is None:
|
if bookmark is None:
|
||||||
|
@ -52,8 +52,8 @@ async def delete_bookmark_by_id(session: AsyncSession, user_id: int, bookmark_id
|
||||||
raise Forbidden
|
raise Forbidden
|
||||||
|
|
||||||
# Delete it
|
# Delete it
|
||||||
statement = delete(Bookmark).where(Bookmark.bookmark_id == bookmark_id)
|
delete_statement = delete(Bookmark).where(Bookmark.bookmark_id == bookmark_id)
|
||||||
await session.execute(statement)
|
await session.execute(delete_statement)
|
||||||
await session.commit()
|
await session.commit()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue