Skip to content

Commit 8b3b014

Browse files
Update imas_validator/assets/rulesets/generic/equilibrium.py
Following Copilot suggestion Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent ee31102 commit 8b3b014

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

imas_validator/assets/rulesets/generic/equilibrium.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ def validate_cocos(ids):
1212
"""
1313

1414
ver = str(ids.ids_properties.version_put.data_dictionary.value)[0]
15-
ref = dd_cocos[ver]
15+
ref = dd_cocos.get(ver)
16+
if ref is None:
17+
raise ValueError(f"Unsupported DD version_put: {ver}")
1618

1719
# time_slice[:]
1820
for itime, time_slice in enumerate(ids.time_slice):

0 commit comments

Comments
 (0)