Skip to content
Snippets Groups Projects
Commit 4c75db50 authored by Philipp Schmidt's avatar Philipp Schmidt
Browse files

Make sure to pop internal disable-correct key from data mapping

parent 955e86ac
No related branches found
No related tags found
1 merge request!629Pop internal disable-correct key from data mapping
...@@ -910,7 +910,7 @@ class ActionsServer: ...@@ -910,7 +910,7 @@ class ActionsServer:
for karabo_id in pconf: for karabo_id in pconf:
dconfig = data_conf[karabo_id] dconfig = data_conf[karabo_id]
if dconfig.get('disable-correct', False): if dconfig.pop('disable-correct', False):
# Skip this detector installation for # Skip this detector installation for
# corrections if disabled. # corrections if disabled.
continue continue
...@@ -1036,6 +1036,9 @@ class ActionsServer: ...@@ -1036,6 +1036,9 @@ class ActionsServer:
triple = any(det in karabo_id for det in triple = any(det in karabo_id for det in
["LPD", "AGIPD", "JUNGFRAU", "JF", "JNGFR"]) ["LPD", "AGIPD", "JUNGFRAU", "JF", "JNGFR"])
# This fails silently if the hardcoded strings above are
# ever changed (triple = False) but the underlying notebook
# still expects run-high/run-med/run-low.
if triple and len(runs) == 1: if triple and len(runs) == 1:
runs_dict = {'run-high': runs[0], runs_dict = {'run-high': runs[0],
'run-med': '0', 'run-med': '0',
...@@ -1051,6 +1054,9 @@ class ActionsServer: ...@@ -1051,6 +1054,9 @@ class ActionsServer:
# is not migrated, thus skipping some validation here. # is not migrated, thus skipping some validation here.
thisconf = copy.copy(data_conf[karabo_id]) thisconf = copy.copy(data_conf[karabo_id])
# Pop internal key to avoid propagation to xfel-calibrate.
thisconf.pop('disable-correct', None)
if (karabo_id in pconf if (karabo_id in pconf
and isinstance(pconf[karabo_id], dict)): and isinstance(pconf[karabo_id], dict)):
thisconf.update(copy.copy(pconf[karabo_id])) thisconf.update(copy.copy(pconf[karabo_id]))
......
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