mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-15 21:31:26 +00:00
Fixes name import in openlibrary
This commit is contained in:
parent
a176c6cd35
commit
5cf9e24ae5
1 changed files with 1 additions and 5 deletions
|
@ -65,6 +65,7 @@ class Connector(AbstractConnector):
|
|||
]
|
||||
|
||||
self.author_mappings = [
|
||||
Mapping('name'),
|
||||
Mapping('born', remote_field='birth_date', formatter=get_date),
|
||||
Mapping('died', remote_field='death_date', formatter=get_date),
|
||||
Mapping('bio', formatter=get_description),
|
||||
|
@ -185,11 +186,6 @@ class Connector(AbstractConnector):
|
|||
|
||||
author = models.Author(openlibrary_key=olkey)
|
||||
author = update_from_mappings(author, data, self.author_mappings)
|
||||
name = data.get('name')
|
||||
# TODO this is making some BOLD assumption
|
||||
if name:
|
||||
author.last_name = name.split(' ')[-1]
|
||||
author.first_name = ' '.join(name.split(' ')[:-1])
|
||||
author.save()
|
||||
|
||||
return author
|
||||
|
|
Loading…
Reference in a new issue