From b8165bf68b0ccd5d4fd5ba8fc242968b74d982f4 Mon Sep 17 00:00:00 2001 From: Lena Garber Date: Tue, 11 Feb 2025 14:56:18 -0500 Subject: [PATCH] Ignore none values when diffing nested dicts --- plugins/module_utils/linode_helper.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/module_utils/linode_helper.py b/plugins/module_utils/linode_helper.py index 0429881b..f1832370 100644 --- a/plugins/module_utils/linode_helper.py +++ b/plugins/module_utils/linode_helper.py @@ -137,6 +137,11 @@ def handle_updates( old_value = parse_linode_types(getattr(obj, key)) + if isinstance(new_value, dict): + # If this field is a dict, we only want to compare values that are + # specified by the user + old_value, new_value = dict_select_matching(old_value, new_value) + has_diff = new_value != old_value # We should convert properties to sets