Skip to content

Commit a00fda5

Browse files
cursoragentarmenzg
andcommitted
Fix KeyError for optional Slack attachments
Co-authored-by: Armen Zambrano G. <armenzg@users.noreply.github.com>
1 parent 265df6e commit a00fda5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sentry/integrations/slack/integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def send_notification(
117117
channel=target.resource_id,
118118
blocks=payload["blocks"],
119119
text=payload["text"],
120-
attachments=payload["attachments"],
120+
attachments=payload.get("attachments", None),
121121
unfurl_links=False,
122122
unfurl_media=False,
123123
)

0 commit comments

Comments
 (0)