fixes import matching with local books
This commit is contained in:
parent
e3a803b907
commit
86504989b4
11 changed files with 63 additions and 50 deletions
|
@ -99,14 +99,14 @@ class Connector(AbstractConnector):
|
|||
def get_or_create_author(self, remote_id):
|
||||
''' load that author '''
|
||||
try:
|
||||
return models.Author.objects.get(remote_id=remote_id)
|
||||
return models.Author.objects.get(origin_id=remote_id)
|
||||
except ObjectDoesNotExist:
|
||||
pass
|
||||
|
||||
data = get_data(remote_id)
|
||||
|
||||
# ingest a new author
|
||||
author = models.Author(remote_id=remote_id)
|
||||
author = models.Author(origin_id=remote_id)
|
||||
author = update_from_mappings(author, data, self.author_mappings)
|
||||
author.save()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue