forked from mirrors/bookwyrm
Another error check point in abstract connector
This commit is contained in:
parent
5c48f237d6
commit
90cccc455e
1 changed files with 3 additions and 0 deletions
|
@ -112,6 +112,9 @@ class AbstractConnector(ABC):
|
|||
# remember this hack: re-use the work data as the edition data
|
||||
work_data = data
|
||||
|
||||
if not work_data or not edition_data:
|
||||
raise ConnectorException('Unable to load book data: %s' % remote_id)
|
||||
|
||||
# at this point, we need to figure out the work, edition, or both
|
||||
# atomic so that we don't save a work with no edition for vice versa
|
||||
with transaction.atomic():
|
||||
|
|
Loading…
Reference in a new issue