Skip to content

Commit 1964818

Browse files
committed
fix(importer): don't block the preview if eitem missing
1 parent 7ee23e5 commit 1964818

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎cds_ils/importer/eitems/importer.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,10 @@ def summary(self):
371371

372372
def preview_import(self, matched_document):
373373
"""Preview eitem JSON."""
374+
if not self.eitem_json:
375+
# eitem is not always there, sometimes we just create a doc
376+
return None
377+
374378
self.action = "create"
375379
if matched_document:
376380
pid = matched_document["pid"]

0 commit comments

Comments
 (0)