Support users with no shared inbox

This commit is contained in:
Mouse Reeve
2020-02-07 13:39:48 -08:00
parent 9360f4512c
commit ef2209e77b
6 changed files with 12 additions and 8 deletions

View File

@ -15,10 +15,9 @@ def book_search(query):
data = response.json()
results = []
for doc in data['docs'][:5]:
key = doc['key'].split('/')[-1]
results.append({
'title': doc['title'],
'olkey': key,
'olkey': doc['key'],
'year': doc['first_publish_year'],
'author': doc['author_name'][0],
})