From 4e8b556d7eb5e7ccba19d2c5652ac1c027e4ce49 Mon Sep 17 00:00:00 2001 From: philip Date: Thu, 26 Dec 2024 18:21:08 +0000 Subject: [PATCH] avoid exception if issn not found DOAJ/doajPM#4031 --- portality/tasks/datalog_journal_added_update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portality/tasks/datalog_journal_added_update.py b/portality/tasks/datalog_journal_added_update.py index bbd7fda8f..f29562362 100644 --- a/portality/tasks/datalog_journal_added_update.py +++ b/portality/tasks/datalog_journal_added_update.py @@ -182,7 +182,7 @@ def sync_datalog_journal_added(logger_fn: Callable[[str], None] = None): fetch_date = get_fetch_datalog_date() logger_fn(f'latest_date of Datalog: {fetch_date}') new_datalog_list = find_new_datalog_journals(fetch_date) - new_datalog_list = (r for r in new_datalog_list if not datalog_journal_added.is_issn_exists(r.issn, r.date_added)) + new_datalog_list = (r for r in new_datalog_list if r.issn and not datalog_journal_added.is_issn_exists(r.issn, r.date_added)) new_datalog_list = (dao.patch_model_for_bulk(r) for r in new_datalog_list) new_datalog_list = list(new_datalog_list) if new_datalog_list: