diff --git a/src/device/service/Tools.py b/src/device/service/Tools.py index 04ece2888465233438ee4bd7b06609cb420bfe45..c982ebc087a2a920b75b83a13017912582021392 100644 --- a/src/device/service/Tools.py +++ b/src/device/service/Tools.py @@ -135,8 +135,8 @@ def _raw_config_rules_to_grpc( errors.append(error_template.format(device_uuid, str(resource_key), str(resource_value))) continue + if resource_value is None: continue resource_value = json.loads(resource_value) if isinstance(resource_value, str) else resource_value - if resource_value is None: resource_value = {} resource_value = {field_name : (field_value, False) for field_name,field_value in resource_value.items()} update_config_rule_custom(device_config.config_rules, resource_key, resource_value, new_action=config_action)