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:
parent
7e6fe97f57
commit
f6e47e4055
1 changed files with 3 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue