mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2025-12-06 15:15:36 +01:00
Fix book annotation handler
This commit is contained in:
@@ -109,7 +109,7 @@ async def get_remote_book(source_id: int, remote_id: int):
|
||||
|
||||
@book_router.get("/{id}/annotation", response_model=BookAnnotation)
|
||||
async def get_book_annotation(id: int):
|
||||
annotation = await BookAnnotationDB.objects.get(book__id=id)
|
||||
annotation = await BookAnnotationDB.objects.get_or_none(book__id=id)
|
||||
|
||||
if annotation is None:
|
||||
raise HTTPException(status.HTTP_404_NOT_FOUND)
|
||||
|
||||
Reference in New Issue
Block a user