Skip to content

Commit

Permalink
fix(api): Don't error if releases/commits don't exist when attempting…
Browse files Browse the repository at this point in the history
… to fetch incident suspects.

No need to error here, just don't return anything
  • Loading branch information
wedamija committed Jun 10, 2019
1 parent ddbd59a commit 9c43c42
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/sentry/incidents/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
from django.utils import timezone

from sentry.api.event_search import get_snuba_query_args
from sentry.models import (
Commit,
Release,
)
from sentry.incidents.models import (
Incident,
IncidentActivity,
Expand Down Expand Up @@ -302,7 +306,10 @@ def get_incident_suspects(incident, projects):
seen = set()
for group in groups:
event = group.get_latest_event_for_environments()
committers = get_event_file_committers(group.project, event)
try:
committers = get_event_file_committers(group.project, event)
except Release.DoesNotExist, Commit.DoesNotExist:
continue
for committer in committers:
author = committer['author']
for commit in committer['commits']:
Expand Down

0 comments on commit 9c43c42

Please sign in to comment.