mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Change idempotency check to be single pass (#42087)
- Previously all data between both data structures was compared - Results in situations where updates are done when not needed - Changes to single pass so only data in payload is compared
This commit is contained in:
parent
09fec5a482
commit
3ee3fc893d
1 changed files with 8 additions and 8 deletions
|
@ -130,14 +130,14 @@ class MerakiModule(object):
|
|||
if not optional_ignore:
|
||||
optional_ignore = ('')
|
||||
|
||||
for k, v in original.items():
|
||||
try:
|
||||
if k not in ignored_keys and k not in optional_ignore:
|
||||
if v != proposed[k]:
|
||||
is_changed = True
|
||||
except KeyError:
|
||||
if v != '':
|
||||
is_changed = True
|
||||
# for k, v in original.items():
|
||||
# try:
|
||||
# if k not in ignored_keys and k not in optional_ignore:
|
||||
# if v != proposed[k]:
|
||||
# is_changed = True
|
||||
# except KeyError:
|
||||
# if v != '':
|
||||
# is_changed = True
|
||||
for k, v in proposed.items():
|
||||
try:
|
||||
if k not in ignored_keys and k not in optional_ignore:
|
||||
|
|
Loading…
Reference in a new issue