From 6b1fadbbed1865ad666f1b7245d96c3aec590c8b Mon Sep 17 00:00:00 2001 From: th3r00t Date: Thu, 2 Nov 2023 22:58:09 -0400 Subject: [PATCH] Fixed improper call to book id field. --- src/frontend/lib/FastAPIServer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/lib/FastAPIServer.py b/src/frontend/lib/FastAPIServer.py index 339cbca..ef91c17 100644 --- a/src/frontend/lib/FastAPIServer.py +++ b/src/frontend/lib/FastAPIServer.py @@ -64,7 +64,7 @@ def books_tojson(obj) -> dumps: for book in obj: convert_none = lambda x: x if x is not None else "None" _books.append({ - "book_id": book[0].book_id, + "book_id": book[0].id, "title": book[0].title, "author": book[0].author, "categories": convert_none(book[0].categories), @@ -79,7 +79,7 @@ def books_tojson(obj) -> dumps: "identifier": convert_none(book[0].identifier), "publisher": convert_none(book[0].publisher), }) - return _books + return dumps(_books) def book_tojson(book) -> dumps: