Fix: robustify against KeyError #8

Merged
mih merged 1 commit from a.wagner/pool-publication-page:fix-pub-error into main 2026-06-26 07:05:56 +00:00

View file

@ -208,8 +208,7 @@ def publishing_process(d: dict) -> dict[str, str] | None:
if (pubdate := csl_publish_date(d)) is not None: if (pubdate := csl_publish_date(d)) is not None:
has_detail = True has_detail = True
res["at_time"] = pubdate res["at_time"] = pubdate
if (issn := d.get("ISSN", None)) is not None:
if (issn := d["ISSN"]) is not None:
has_detail = True has_detail = True
# there can be more than one (e.g. different for print / online) # 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 # if that's the case, use the 1st - we have no more data at hand