diff --git a/apps/worker/services/test_analytics/ta_process_flakes.py b/apps/worker/services/test_analytics/ta_process_flakes.py index 61cf26df09..879ac28391 100644 --- a/apps/worker/services/test_analytics/ta_process_flakes.py +++ b/apps/worker/services/test_analytics/ta_process_flakes.py @@ -24,7 +24,7 @@ def get_relevant_uploads(repo_id: int, commit_id: str) -> QuerySet[ReportSession report__commit__repository__repoid=repo_id, report__commit__commitid=commit_id, state__in=["processed"], - ) + ).select_related("report", "report__commit", "report__commit__repository") def fetch_current_flakes(repo_id: int) -> dict[bytes, Flake]: