From 025fd7f0c0c64626aae4f12c98e940c984961548 Mon Sep 17 00:00:00 2001 From: Jonathan de Bruin Date: Fri, 15 Sep 2023 01:08:20 +0200 Subject: [PATCH] Fix resolver with unknown Re3Data software (#60) --- datahugger/resolvers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/datahugger/resolvers.py b/datahugger/resolvers.py index 612348f..45fb9dd 100644 --- a/datahugger/resolvers.py +++ b/datahugger/resolvers.py @@ -69,4 +69,7 @@ def _resolve_service_with_re3data(doi): if publisher.lower() == repo["name"].lower(): r_software = get_re3data_repository(repo["id"]) - return RE3DATA_SOFTWARE[r_software.lower()] + try: + return RE3DATA_SOFTWARE[r_software.lower()] + except KeyError: + return None