Another error check point in abstract connector

This commit is contained in:
Mouse Reeve 2020-10-28 17:16:16 -07:00
parent 5c48f237d6
commit 90cccc455e

View file

@ -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():