chore(repositories): Switch over SeerProjectRepository attribute uses of Project and Repository to use ProjectRepository#115459
Conversation
…es of `Project` and `Repository` to use `ProjectRepository` As per the title, follow up to #115456
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b65e1fa. Configure here.
| project=project, repository__status=ObjectStatus.ACTIVE | ||
| ) | ||
| .select_related("repository") | ||
| .select_related("repository", "project_repository", "project_repository__repository") |
There was a problem hiding this comment.
Unnecessary JOINs added when feature flag is off
Low Severity
The else branches (feature flag off) now include select_related("project_repository", "project_repository__repository") in addition to "repository". When use_fk is False, neither build_repo_definition_from_project_repo nor the pid computation ever accesses project_repository. These extra select_related calls add two unnecessary LEFT OUTER JOINs to every query on the default (non-flag) path, increasing SQL complexity and data transfer for no benefit.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit b65e1fa. Configure here.
11be069
into
danf/repository-project-seerprojectrepo


As per the title, follow up to #115456