diff --git a/webservice/webservice.py b/webservice/webservice.py index b1c0106974fb2e6e34ce58d423c62c0e0be8e9fc..f26b99f248f6354e3c1612722d67e43997c2c61b 100644 --- a/webservice/webservice.py +++ b/webservice/webservice.py @@ -910,11 +910,6 @@ class ActionsServer: for karabo_id in pconf: dconfig = data_conf[karabo_id] - if dconfig.pop('disable-correct', False): - # Skip this detector installation for - # corrections if disabled. - continue - # check for files according to mapping in raw run dir. if any(y in x for x in fl for y in dconfig['karabo-da']): @@ -934,6 +929,13 @@ class ActionsServer: Errors.REQUEST_FAILED) return + for karabo_id in list(detectors.keys()): + # Check for any detectors for which corrections are + # disabled manually. + if detectors[karabo_id].pop('disable-correct', False): + logging.warning(f'Skipping disabled detector {karabo_id}') + del detectors[karabo_id] + if len(detectors) == 0: msg = Errors.NOTHING_TO_DO.format(rpath) logging.warning(msg)