浏览代码

Fix issue where pages may not come back from OL

Colin Powell 1 年之前
父节点
当前提交
7cb818b585
共有 1 个文件被更改,包括 1 次插入1 次删除
  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):