Skip to content
Snippets Groups Projects
Commit 63a727ee authored by Thomas Kluyver's avatar Thomas Kluyver
Browse files

Fix for absent module numbers

parent 0e9b1ed5
No related branches found
No related tags found
1 merge request!885Revised CalCat API
...@@ -508,7 +508,7 @@ class CalibrationData(Mapping): ...@@ -508,7 +508,7 @@ class CalibrationData(Mapping):
) )
module_details = sorted(pdus, key=lambda d: d["karabo_da"]) module_details = sorted(pdus, key=lambda d: d["karabo_da"])
for mod in module_details: for mod in module_details:
if mod.get("module_number", -1) < 0: if mod.get("module_number") is None:
mod["module_number"] = int(re.findall(r"\d+", mod["karabo_da"])[-1]) mod["module_number"] = int(re.findall(r"\d+", mod["karabo_da"])[-1])
constant_groups = {} constant_groups = {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment