forked from mirrors/bookwyrm
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,8 +168,9 @@ class Connector(AbstractConnector):
|
|||
author = update_from_mappings(author, data, mappings)
|
||||
# TODO this is making some BOLD assumption
|
||||
name = data.get('name')
|
||||
author.last_name = name.split(' ')[-1]
|
||||
author.first_name = ' '.join(name.split(' ')[:-1])
|
||||
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