Skip to content

prefetching locations when building dedupe candidate scope queryset#14483

Open
dogboat wants to merge 2 commits intoDefectDojo:bugfixfrom
dogboat:dedupe-location-prefetch-fix
Open

prefetching locations when building dedupe candidate scope queryset#14483
dogboat wants to merge 2 commits intoDefectDojo:bugfixfrom
dogboat:dedupe-location-prefetch-fix

Conversation

@dogboat
Copy link
Contributor

@dogboat dogboat commented Mar 10, 2026

This PR updates the build_candidate_scope_queryset() function to handle the prefetch list differently when V3 locations are enabled to prevent crashes when updating locations on a finding. Previously, changing locations when editing a finding would cause a 500 when V3 locations are enabled; now it does not.

Copy link
Member

@valentijnscholten valentijnscholten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description seems to suggest there is a bug that is fixed by this PR. Should the PR add a testcase to prove the bug is fixed and we don't regress in the future?

@dogboat
Copy link
Contributor Author

dogboat commented Mar 10, 2026

The PR description seems to suggest there is a bug that is fixed by this PR. Should the PR add a testcase to prove the bug is fixed and we don't regress in the future?

Good call, added a test for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants