mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-04 01:33:09 +00:00
Handle empty datadog_monitor message (#3468)
Since message is not required, it may be of type None, which cannot have a replace() called on it.
This commit is contained in:
@@ -197,7 +197,9 @@ def main():
|
||||
unmute_monitor(module)
|
||||
|
||||
def _fix_template_vars(message):
|
||||
return message.replace('[[', '{{').replace(']]', '}}')
|
||||
if message:
|
||||
return message.replace('[[', '{{').replace(']]', '}}')
|
||||
return message
|
||||
|
||||
|
||||
def _get_monitor(module):
|
||||
|
||||
Reference in New Issue
Block a user