mirror of
https://gitlab.com/LazyLibrarian/LazyLibrarian.git
synced 2026-02-06 10:47:15 +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']:
|
if authorname in item['document']['author_names']:
|
||||||
bookid = item['document']['id']
|
bookid = item['document']['id']
|
||||||
break
|
break
|
||||||
except (IndexError, KeyError):
|
except (IndexError, KeyError, TypeError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if bookid:
|
if bookid:
|
||||||
@ -914,7 +914,7 @@ query FindAuthor { authors_by_pk(id: [authorid])
|
|||||||
if item['contributions'] and 'cachedImage' in item['contributions'][0]['author']:
|
if item['contributions'] and 'cachedImage' in item['contributions'][0]['author']:
|
||||||
url = item['contributions'][0]['author']['cachedImage']['url']
|
url = item['contributions'][0]['author']['cachedImage']['url']
|
||||||
break
|
break
|
||||||
except (IndexError, KeyError):
|
except (IndexError, KeyError, TypeError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if url:
|
if url:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user