Fix typing

pull/130/head
stijndcl 2022-09-01 01:26:46 +02:00
parent 152f84ed1c
commit 149d132e6d
1 changed files with 4 additions and 4 deletions

View File

@ -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
"""
statement = select(Bookmark).where(Bookmark.bookmark_id == bookmark_id)
bookmark = (await session.execute(statement)).scalar_one_or_none()
select_statement = select(Bookmark).where(Bookmark.bookmark_id == bookmark_id)
bookmark = (await session.execute(select_statement)).scalar_one_or_none()
# No bookmark with this id
if bookmark is None:
@ -52,8 +52,8 @@ async def delete_bookmark_by_id(session: AsyncSession, user_id: int, bookmark_id
raise Forbidden
# Delete it
statement = delete(Bookmark).where(Bookmark.bookmark_id == bookmark_id)
await session.execute(statement)
delete_statement = delete(Bookmark).where(Bookmark.bookmark_id == bookmark_id)
await session.execute(delete_statement)
await session.commit()