1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[PR #6811/fc74f9a4 backport][stable-7] [datadog_downtime] - added 'type' to recurrence object when rrule param is present (#6891)

[datadog_downtime] - added 'type' to recurrence object when rrule param is present (#6811)

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

* formatting cleanup

(cherry picked from commit fc74f9a4f2)

Co-authored-by: Simon Keil <freezer_xx@gmx.de>
This commit is contained in:
patchback[bot] 2023-07-08 18:10:16 +02:00 committed by GitHub
parent cda63f7221
commit ed4bc4c1d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -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).

View file

@ -248,7 +248,8 @@ def build_downtime(module):
downtime.timezone = module.params["timezone"] downtime.timezone = module.params["timezone"]
if module.params["rrule"]: if module.params["rrule"]:
downtime.recurrence = DowntimeRecurrence( downtime.recurrence = DowntimeRecurrence(
rrule=module.params["rrule"] rrule=module.params["rrule"],
type="rrule",
) )
return downtime return downtime