Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemental committed Feb 28, 2024
1 parent 52b5037 commit d29b796
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions plugins/modules/grafana_contact_point.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,13 @@ class GrafanaContactPointInterface(object):

if info["status"] == 202:
contact_point = json.loads(to_text(r.read()))
return {"changed": True, "state": data["state"], "contact_point": contact_point}
return {
"changed": True,
"state": data["state"],
"contact_point": contact_point,
}
else:
raise GrafanaAPIException(
"Unable to create contact point: %s" % info
)
raise GrafanaAPIException("Unable to create contact point: %s" % info)

def grafana_update_contact_point(self, data, payload, before):
r, info = fetch_url(
Expand All @@ -216,7 +218,11 @@ class GrafanaContactPointInterface(object):
if before == contact_point:
return {"changed": False}
else:
return {"changed": True, "diff": {"before": before, "after": payload}, "contact_point": contact_point}
return {
"changed": True,
"diff": {"before": before, "after": payload},
"contact_point": contact_point,
}
else:
raise GrafanaAPIException(
"Unable to update contact point %s : %s" % (data["uid"], info)
Expand Down

0 comments on commit d29b796

Please sign in to comment.