forked from mirrors/bookwyrm
Fixes brittle search result data ingest
This commit is contained in:
parent
46e38366c7
commit
3ba76a8b13
1 changed files with 3 additions and 3 deletions
|
@ -20,10 +20,10 @@ def book_search(query):
|
||||||
key = doc['key']
|
key = doc['key']
|
||||||
key = key.split('/')[-1]
|
key = key.split('/')[-1]
|
||||||
results.append({
|
results.append({
|
||||||
'title': doc['title'],
|
'title': doc.get('title'),
|
||||||
'olkey': key,
|
'olkey': key,
|
||||||
'year': doc['first_publish_year'],
|
'year': doc.get('first_publish_year'),
|
||||||
'author': doc['author_name'][0],
|
'author': doc.get('author_name')[0],
|
||||||
})
|
})
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue