Skip to content

Commit

Permalink
[datadog_downtime] - added 'type' to recurrence object when rrule par…
Browse files Browse the repository at this point in the history
…am is present (ansible-collections#6811)

* added 'type' to recurrence object when rrule param is present

* formatting cleanup
  • Loading branch information
froznsm authored and valeriopoggi committed Jul 17, 2023
1 parent 0798cb1 commit 21501c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/6811-datadog-downtime-rrule-type.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- datadog_downtime - presence of ``rrule`` param lead to the Datadog API returning Bad Request due to a missing recurrence type (https://github.com/ansible-collections/community.general/pull/6811).
3 changes: 2 additions & 1 deletion plugins/modules/datadog_downtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ def build_downtime(module):
downtime.timezone = module.params["timezone"]
if module.params["rrule"]:
downtime.recurrence = DowntimeRecurrence(
rrule=module.params["rrule"]
rrule=module.params["rrule"],
type="rrule",
)
return downtime

Expand Down

0 comments on commit 21501c8

Please sign in to comment.