Skip to content

Commit

Permalink
Fix validation issue with missing input key.
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi committed Sep 6, 2024
1 parent 4ab2c8f commit 5eab530
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion premise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"clear_inventory_cache",
"get_regions_definition",
)
__version__ = (2, 1, 1)
__version__ = (2, 1, 2)


from premise.new_database import NewDatabase
Expand Down
3 changes: 3 additions & 0 deletions premise/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down

0 comments on commit 5eab530

Please sign in to comment.