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

(cherry picked from commit 3ee3fc893d)
pull/42223/head
Kevin Breit 7 years ago committed by Matt Clay
parent d2b447e8a1
commit e436806e91

@ -128,17 +128,6 @@ class MerakiModule(object):
ignored_keys = ('id', 'organizationId')
if not optional_ignore:
optional_ignore = ('')
# self.fail_json(msg="Update required check", original=original, proposed=proposed)
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…
Cancel
Save