Skip to content

Commit 1e56756

Browse files
authored
Update dcnm_network.py (#420)
Fix error when want_net_data is None and want_net_data.get() fails.
1 parent cde9dc3 commit 1e56756

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/modules/dcnm_network.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2062,7 +2062,7 @@ def get_diff_merge(self, replace=False):
20622062
# If the playbook sets the deploy key to False, then we need to remove the network from the deploy list.
20632063
for net in all_nets:
20642064
want_net_data = self.find_dict_in_list_by_key_value(search=self.config, key="net_name", value=net)
2065-
if want_net_data.get("deploy") is False:
2065+
if (want_net_data is not None) and (want_net_data.get("deploy") is False):
20662066
modified_all_nets.remove(net)
20672067

20682068
if modified_all_nets:

0 commit comments

Comments
 (0)