mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Fixed improper call to book id field.
This commit is contained in:
4
src/frontend/lib/FastAPIServer.py
vendored
4
src/frontend/lib/FastAPIServer.py
vendored
@@ -64,7 +64,7 @@ def books_tojson(obj) -> dumps:
|
|||||||
for book in obj:
|
for book in obj:
|
||||||
convert_none = lambda x: x if x is not None else "None"
|
convert_none = lambda x: x if x is not None else "None"
|
||||||
_books.append({
|
_books.append({
|
||||||
"book_id": book[0].book_id,
|
"book_id": book[0].id,
|
||||||
"title": book[0].title,
|
"title": book[0].title,
|
||||||
"author": book[0].author,
|
"author": book[0].author,
|
||||||
"categories": convert_none(book[0].categories),
|
"categories": convert_none(book[0].categories),
|
||||||
@@ -79,7 +79,7 @@ def books_tojson(obj) -> dumps:
|
|||||||
"identifier": convert_none(book[0].identifier),
|
"identifier": convert_none(book[0].identifier),
|
||||||
"publisher": convert_none(book[0].publisher),
|
"publisher": convert_none(book[0].publisher),
|
||||||
})
|
})
|
||||||
return _books
|
return dumps(_books)
|
||||||
|
|
||||||
|
|
||||||
def book_tojson(book) -> dumps:
|
def book_tojson(book) -> dumps:
|
||||||
|
|||||||
Reference in New Issue
Block a user