Send connector with search result
also fix typo in get_work_from_edition_data function
This commit is contained in:
parent
9f74e95b00
commit
ac261d7b1a
6 changed files with 65 additions and 12 deletions
|
@ -85,7 +85,7 @@ class Connector(AbstractConnector):
|
|||
return pick_default_edition(data['entries'])
|
||||
|
||||
|
||||
def get_work_from_edition_date(self, data):
|
||||
def get_work_from_edition_data(self, data):
|
||||
try:
|
||||
key = data['works'][0]['key']
|
||||
except (IndexError, KeyError):
|
||||
|
@ -123,6 +123,7 @@ class Connector(AbstractConnector):
|
|||
title=search_result.get('title'),
|
||||
key=key,
|
||||
author=', '.join(author),
|
||||
connector=self,
|
||||
year=search_result.get('first_publish_year'),
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue