Browse Source

fix(alerts): Fix TypeError in Alert Serializer (#57689)

Fix SENTRY-167V
Colleen O'Rourke 1 year ago
parent
commit
bee04927b9
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/sentry/api/serializers/models/alert_rule.py

+ 3 - 1
src/sentry/api/serializers/models/alert_rule.py

@@ -110,7 +110,9 @@ class AlertRuleSerializer(Serializer):
                 "triggers", []
             )
             for action in serialized.get("actions", []):
-                install = sentry_app_installations_by_sentry_app_id.get(str(action["sentryAppId"]))
+                install = sentry_app_installations_by_sentry_app_id.get(
+                    str(action.get("sentryAppId"))
+                )
                 if install:
                     action["_sentry_app_component"] = install.get("sentry_app_component")
                     action["_sentry_app_installation"] = install.get("sentry_app_installation")