diff --git a/core/bookloader.py b/core/bookloader.py index ca8b215c..f61d19e2 100755 --- a/core/bookloader.py +++ b/core/bookloader.py @@ -97,10 +97,15 @@ def add_related(isbn): # this is the work everything will hang off work = edition.work + new_editions = [] for other_isbn in thingisbn(isbn): related_edition = add_by_isbn(other_isbn, work) if related_edition and related_edition.work != edition.work: merge_works(edition.work, related_edition.work) + if related_edition: + new_editions.append(related_edition) + + return new_editions def thingisbn(isbn): diff --git a/core/tasks.py b/core/tasks.py index 692288ab..1eb2c59d 100644 --- a/core/tasks.py +++ b/core/tasks.py @@ -4,8 +4,8 @@ from regluit.core import bookloader @task def add_related(isbn): - bookloader.add_related(isbn) + return bookloader.add_related(isbn) @task def add_by_isbn(isbn): - bookloader.add_by_isbn(isbn) + return bookloader.add_by_isbn(isbn)