From 5eab5303e1f0f64e266fec07aec7b00b2776c608 Mon Sep 17 00:00:00 2001 From: romainsacchi Date: Fri, 6 Sep 2024 15:40:02 +0200 Subject: [PATCH] Fix validation issue with missing `input` key. --- premise/__init__.py | 2 +- premise/validation.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/premise/__init__.py b/premise/__init__.py index f6fcc52c..3dc3b24e 100644 --- a/premise/__init__.py +++ b/premise/__init__.py @@ -4,7 +4,7 @@ "clear_inventory_cache", "get_regions_definition", ) -__version__ = (2, 1, 1) +__version__ = (2, 1, 2) from premise.new_database import NewDatabase diff --git a/premise/validation.py b/premise/validation.py index 147d4096..6033490c 100644 --- a/premise/validation.py +++ b/premise/validation.py @@ -469,6 +469,9 @@ def check_database_name(self): if exc["type"] == "biosphere": # check that the first item of the code field # corresponds to biosphere_name + if "input" not in exc: + exc["input"] = (self.biosphere_name, exc["name"]) + if exc["input"][0] != self.biosphere_name: exc["input"] = (self.biosphere_name, exc["input"][1])