Skip to content

Commit 2f37679

Browse files
authored
fix(autofix): Fix running autofix after all issue summaries (#87134)
Adds the needed condition
1 parent a836c55 commit 2f37679

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/sentry/api/endpoints/group_ai_summary.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,11 @@ def post(self, request: Request, group: Group) -> Response:
239239
with sentry_sdk.start_span(op="ai_summary.generate_fixability_score"):
240240
issue_summary = self._generate_fixability_score(group.id)
241241

242-
with sentry_sdk.start_span(op="ai_summary.trigger_autofix"):
243-
response = trigger_autofix(group=group, event_id=event.event_id, user=request.user)
242+
if issue_summary.scores.is_fixable:
243+
with sentry_sdk.start_span(op="ai_summary.trigger_autofix"):
244+
response = trigger_autofix(
245+
group=group, event_id=event.event_id, user=request.user
246+
)
244247

245248
if response.status_code != 202:
246249
# If autofix trigger fails, we don't cache to let it error and we can run again, this is only temporary for when we're testing this internally.

0 commit comments

Comments
 (0)