Fixes linter issues

This commit is contained in:
Mouse Reeve
2020-09-21 10:25:26 -07:00
parent 4d0176a6f7
commit 425da16fd6
16 changed files with 63 additions and 42 deletions

View File

@ -123,15 +123,15 @@ class Connector(AbstractConnector):
return data.get('docs')
def format_search_result(self, doc):
def format_search_result(self, search_result):
# build the remote id from the openlibrary key
key = self.books_url + doc['key']
author = doc.get('author_name') or ['Unknown']
key = self.books_url + search_result['key']
author = search_result.get('author_name') or ['Unknown']
return SearchResult(
doc.get('title'),
search_result.get('title'),
key,
', '.join(author),
doc.get('first_publish_year'),
search_result.get('first_publish_year'),
)