mirror of
https://gitlab.com/LazyLibrarian/LazyLibrarian.git
synced 2026-02-06 02:36:49 +00:00
Additional check for incomplete data from HC
This commit is contained in:
parent
3dd2f0da1f
commit
432ddf8e39
@ -903,7 +903,7 @@ query FindAuthor { authors_by_pk(id: [authorid])
|
||||
if authorname in item['document']['author_names']:
|
||||
bookid = item['document']['id']
|
||||
break
|
||||
except (IndexError, KeyError):
|
||||
except (IndexError, KeyError, TypeError):
|
||||
pass
|
||||
|
||||
if bookid:
|
||||
@ -914,7 +914,7 @@ query FindAuthor { authors_by_pk(id: [authorid])
|
||||
if item['contributions'] and 'cachedImage' in item['contributions'][0]['author']:
|
||||
url = item['contributions'][0]['author']['cachedImage']['url']
|
||||
break
|
||||
except (IndexError, KeyError):
|
||||
except (IndexError, KeyError, TypeError):
|
||||
pass
|
||||
|
||||
if url:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user