Fixes loading covers and authors
This commit is contained in:
@ -146,13 +146,11 @@ class AbstractConnector(ABC):
|
||||
|
||||
def create_book(self, remote_id, data, model):
|
||||
''' create a work or edition from data '''
|
||||
print(remote_id)
|
||||
book = model.objects.create(
|
||||
remote_id=remote_id,
|
||||
title=data['title'],
|
||||
connector=self.connector,
|
||||
)
|
||||
print(book.remote_id)
|
||||
return self.update_book_from_data(book, data)
|
||||
|
||||
|
||||
|
@ -41,9 +41,13 @@ class Connector(AbstractConnector):
|
||||
]
|
||||
|
||||
self.author_mappings = [
|
||||
Mapping('born', remote_field='birth_date', formatter=get_date),
|
||||
Mapping('died', remote_field='death_date', formatter=get_date),
|
||||
Mapping('name'),
|
||||
Mapping('bio'),
|
||||
Mapping('openlibrary_key'),
|
||||
Mapping('wikipedia_link'),
|
||||
Mapping('aliases'),
|
||||
Mapping('born', formatter=get_date),
|
||||
Mapping('died', formatter=get_date),
|
||||
]
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user