From 57859371e8851b1333237183dd4839d49ab51e8f Mon Sep 17 00:00:00 2001 From: Adina Wagner Date: Fri, 26 Jun 2026 08:54:40 +0200 Subject: [PATCH] Fix: robustify against KeyError --- filters/enrich-via-doi.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/filters/enrich-via-doi.py b/filters/enrich-via-doi.py index 30403ce..43b529c 100644 --- a/filters/enrich-via-doi.py +++ b/filters/enrich-via-doi.py @@ -208,8 +208,7 @@ def publishing_process(d: dict) -> dict[str, str] | None: if (pubdate := csl_publish_date(d)) is not None: has_detail = True res["at_time"] = pubdate - - if (issn := d["ISSN"]) is not None: + if (issn := d.get("ISSN", None)) is not None: has_detail = True # there can be more than one (e.g. different for print / online) # if that's the case, use the 1st - we have no more data at hand -- 2.52.0