diff --git a/src/sentry/api/endpoints/group_ai_autofix.py b/src/sentry/api/endpoints/group_ai_autofix.py index 74a1a07e816770..780946cd7000d8 100644 --- a/src/sentry/api/endpoints/group_ai_autofix.py +++ b/src/sentry/api/endpoints/group_ai_autofix.py @@ -163,6 +163,7 @@ def post(self, request: Request, group: Group) -> Response: if not ( features.has("projects:ai-autofix", group.project) or features.has("organizations:autofix", group.organization) + or group.organization.get_option("sentry:gen_ai_consent", False) ): return self._respond_with_error("AI Autofix is not enabled for this project.", 403) diff --git a/src/sentry/api/endpoints/group_autofix_setup_check.py b/src/sentry/api/endpoints/group_autofix_setup_check.py index 6f0d2e05a53476..96f1d5c20ee123 100644 --- a/src/sentry/api/endpoints/group_autofix_setup_check.py +++ b/src/sentry/api/endpoints/group_autofix_setup_check.py @@ -108,12 +108,6 @@ def get(self, request: Request, group: Group) -> Response: """ Checks if we are able to run Autofix on the given group. """ - if not ( - features.has("projects:ai-autofix", group.project) - or features.has("organizations:autofix", group.organization) - ): - return Response({"detail": "Feature not enabled for project"}, status=403) - org: Organization = request.organization has_gen_ai_consent = org.get_option("sentry:gen_ai_consent", False)