Replace any None JSON values with 'n/a'

This commit is contained in:
Ian O'Malley 2020-03-24 13:18:02 -04:00 • committed by GitHub
commit 4111f7f017
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -530,6 +530,10 @@ class SafariBooks:
if "last_chapter_read" in response: if "last_chapter_read" in response:
del response["last_chapter_read"] del response["last_chapter_read"]
for key, value in response.items():
if value is None:
response[key] = 'n/a'
return response return response
def get_book_chapters(self, page=1): def get_book_chapters(self, page=1):