diff options
| author | 2020-06-01 01:51:58 +0000 | |
|---|---|---|
| committer | 2020-06-01 01:51:58 +0000 | |
| commit | c2803274d12d55ab47cd5e4382c80a6c61d7a300 (patch) | |
| tree | 042c372bf43f71a78fb8fad6c85e8e401b4e7651 /contrib/modules/grafana.py | |
| parent | Fix crash in IRCClientProtocol.send_messages due to missing overlongmode in u... (diff) | |
| signature | ||
Handle message-less Grafana alerts
Diffstat (limited to 'contrib/modules/grafana.py')
| -rw-r--r-- | contrib/modules/grafana.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/modules/grafana.py b/contrib/modules/grafana.py index 857b2a5..4209f76 100644 --- a/contrib/modules/grafana.py +++ b/contrib/modules/grafana.py @@ -3,4 +3,7 @@ import json async def process(request): obj = json.loads(await request.text()) - return f'{obj["title"]} - {obj["message"]}' + if 'message' in obj: + return f'{obj["title"]} - {obj["message"]}' + else: + return obj['title'] |
