diff --git a/webservice/webservice.py b/webservice/webservice.py index b67f5dc48637b4a01e9eb5a0a880170a94fed99a..b1c0106974fb2e6e34ce58d423c62c0e0be8e9fc 100644 --- a/webservice/webservice.py +++ b/webservice/webservice.py @@ -910,7 +910,7 @@ class ActionsServer: for karabo_id in pconf: dconfig = data_conf[karabo_id] - if dconfig.get('disable-correct', False): + if dconfig.pop('disable-correct', False): # Skip this detector installation for # corrections if disabled. continue @@ -1036,6 +1036,9 @@ class ActionsServer: triple = any(det in karabo_id for det in ["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: runs_dict = {'run-high': runs[0], 'run-med': '0', @@ -1051,6 +1054,9 @@ class ActionsServer: # is not migrated, thus skipping some validation here. 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 and isinstance(pconf[karabo_id], dict)): thisconf.update(copy.copy(pconf[karabo_id]))