Skip to content

Commit

Permalink
more typing
Browse files Browse the repository at this point in the history
  • Loading branch information
Christinarlong committed Oct 4, 2024
1 parent 4104a2e commit 21f5192
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sentry/sentry_apps/tasks/sentry_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ def notify_sentry_app(event: Event | GroupEvent, futures):
)


def send_webhooks(installation: RpcSentryAppInstallation, event: str, **kwargs: Any):
def send_webhooks(installation: RpcSentryAppInstallation, event: str, **kwargs: Any) -> None:
servicehook: ServiceHook
try:
servicehook = ServiceHook.objects.get(
Expand All @@ -457,10 +457,10 @@ def send_webhooks(installation: RpcSentryAppInstallation, event: str, **kwargs:
"send_webhooks.missing_servicehook",
extra={"installation_id": installation.id, "event": event},
)
return
return None

if event not in servicehook.events:
return
return None

# The service hook applies to all projects if there are no
# ServiceHookProject records. Otherwise we want check if
Expand Down

0 comments on commit 21f5192

Please sign in to comment.