Changeset - f5ed6b020878
[Not reviewed]
default
0 1 0
Dennis Fink - 3 years ago 2022-03-21 20:55:40
dennis.fink@c3l.lu
Don't fail if the book has not isbn
1 file changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
stockcli/books.py
Show inline comments
 
@@ -25,12 +25,16 @@ def add_book_by_barcode(barcode: str) ->
 
    )
 

	
 
    for book in all_books:
 
        book_metadata = utils.get_request(
 
            f"userfields/userentity-books/{book['id']}", cached=True
 
        )
 

	
 
        if book_metadata["isbn"] is None:
 
            continue
 

	
 
        if isbnlib.canonical(book_metadata["isbn"]) == canonical_isbn:
 

	
 
            book_metadata = utils.get_request(
 
                f"userfields/userentity-books/{book['id']}", cached=False
 
            )
 

	
0 comments (0 inline, 0 general)