From 24278199265b396ae74a8962c6720d249d869f61 Mon Sep 17 00:00:00 2001 From: Barbara Krautgartner Date: Mon, 18 Mar 2024 14:45:35 +0000 Subject: [PATCH] fix: check for publication date need to check for pub date because zotero expressions can come without one --- apis_ontology/scripts/import_helpers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apis_ontology/scripts/import_helpers.py b/apis_ontology/scripts/import_helpers.py index 60db38b..2480e0a 100644 --- a/apis_ontology/scripts/import_helpers.py +++ b/apis_ontology/scripts/import_helpers.py @@ -164,9 +164,9 @@ def create_expression( relevant_pages=relevant_pages, defaults={"data_source": source}, ) - - expression.publication_date = pub_date - expression.save() + if pub_date: + expression.publication_date = pub_date + expression.save() return expression, created