mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-25 01:20:35 +00:00
Don't break on absent author name
This commit is contained in:
parent
263b90599c
commit
772ba1840b
1 changed files with 3 additions and 2 deletions
|
@ -168,6 +168,7 @@ class Connector(AbstractConnector):
|
||||||
author = update_from_mappings(author, data, mappings)
|
author = update_from_mappings(author, data, mappings)
|
||||||
# TODO this is making some BOLD assumption
|
# TODO this is making some BOLD assumption
|
||||||
name = data.get('name')
|
name = data.get('name')
|
||||||
|
if name:
|
||||||
author.last_name = name.split(' ')[-1]
|
author.last_name = name.split(' ')[-1]
|
||||||
author.first_name = ' '.join(name.split(' ')[:-1])
|
author.first_name = ' '.join(name.split(' ')[:-1])
|
||||||
author.save()
|
author.save()
|
||||||
|
|
Loading…
Reference in a new issue