From 90cccc455efeb886c215f2b18e7ef65b8633cd7b Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 28 Oct 2020 17:16:16 -0700 Subject: [PATCH] Another error check point in abstract connector --- bookwyrm/connectors/abstract_connector.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bookwyrm/connectors/abstract_connector.py b/bookwyrm/connectors/abstract_connector.py index 602c8d53..25db648c 100644 --- a/bookwyrm/connectors/abstract_connector.py +++ b/bookwyrm/connectors/abstract_connector.py @@ -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():