From 250697bb5eff33faca4ed5c6cb03162e3770411e Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 31 Jan 2023 12:26:42 +0000 Subject: [PATCH] Device component: - added statement to ignore empty of not-found config rules from drivers --- src/device/service/Tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device/service/Tools.py b/src/device/service/Tools.py index 04ece2888..c982ebc08 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) -- GitLab