Skip to content

Commit

Permalink
fix: change update diff check
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemental committed Mar 20, 2024
1 parent c0265ff commit 7da1db7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions plugins/modules/grafana_contact_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,16 +402,14 @@ def grafana_update_contact_point(self, data, payload):
)

if info["status"] == 202:
if self.contact_point.get("provenance") and data.get("provisioning"):
del self.contact_point["provenance"]

if self.contact_point == payload:
contact_point = self.grafana_check_contact_point_match(data)
if self.contact_point == contact_point:
return {"changed": False}
else:
return {
"changed": True,
"diff": {"before": self.contact_point, "after": payload},
"contact_point": payload,
"diff": {"before": self.contact_point, "after": contact_point},
"contact_point": contact_point,
}
else:
raise GrafanaAPIException(
Expand Down

0 comments on commit 7da1db7

Please sign in to comment.