Merge pull request #171 from mouse-reeve/base-model-test
Unify absolute_id and remote_id fields in database
This commit is contained in:
commit
30350f035e
34 changed files with 293 additions and 235 deletions
|
@ -124,7 +124,7 @@ class Connector(AbstractConnector):
|
|||
|
||||
|
||||
def format_search_result(self, doc):
|
||||
# build the absolute id from the openlibrary key
|
||||
# build the remote id from the openlibrary key
|
||||
key = self.books_url + doc['key']
|
||||
author = doc.get('author_name') or ['Unknown']
|
||||
return SearchResult(
|
||||
|
|
|
@ -47,7 +47,7 @@ class Connector(AbstractConnector):
|
|||
def format_search_result(self, book):
|
||||
return SearchResult(
|
||||
book.title,
|
||||
book.absolute_id,
|
||||
book.local_id,
|
||||
book.author_text,
|
||||
book.published_date.year if book.published_date else None,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue