Merge pull request #716 from grafana/matiasb/fix-incident-log-no-backend

Fix error when generating log line for non-handled messaging backend
This commit is contained in:
Matias Bordese 2022-10-26 10:28:16 -03:00 committed by GitHub
commit 8c1f1499cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -596,7 +596,7 @@ class IncidentLogBuilder:
except ValueError:
pass
else:
result += f"send {backend.label.lower()} message to {user_verbal}"
result += f"send {backend.label.lower() if backend else ''} message to {user_verbal}"
if not result:
result += f"inviting {user_verbal} but notification channel is unspecified"
return result