Sfoglia il codice sorgente

Fix issue where pages may not come back from OL

Colin Powell 1 anno fa
parent
commit
7cb818b585
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      vrobbler/apps/books/models.py

+ 1 - 1
vrobbler/apps/books/models.py

@@ -182,7 +182,7 @@ class Book(LongPlayScrobblableMixin):
                 )
 
             # If we don't know pages, don't overwrite existing with None
-            if data.get("pages") == None:
+            if "pages" in data.keys() and data.get("pages") == None:
                 data.pop("pages")
 
             if not isinstance(data.get("pages"), int):