Conversation
jrdh
force-pushed
the
fix/cdd-3498-resolve-page-classification-clashes
branch
from
August 4, 2026 07:46
fc6a36e to
b9d10df
Compare
jrdh
force-pushed
the
fix/cdd-3506-based-on-3498
branch
from
August 4, 2026 07:52
84c8a76 to
e8dd16f
Compare
jrdh
marked this pull request as draft
August 7, 2026 08:29
jrdh
force-pushed
the
fix/cdd-3498-resolve-page-classification-clashes
branch
from
August 7, 2026 10:06
fb557ce to
00ba02b
Compare
jrdh
force-pushed
the
fix/cdd-3506-based-on-3498
branch
from
August 11, 2026 21:29
d406fcc to
5164df3
Compare
jrdh
force-pushed
the
fix/cdd-3498-resolve-page-classification-clashes
branch
from
August 11, 2026 21:31
00ba02b to
3534333
Compare
jrdh
force-pushed
the
fix/cdd-3506-based-on-3498
branch
from
August 11, 2026 21:32
5164df3 to
1977a62
Compare
jrdh
force-pushed
the
fix/cdd-3506-based-on-3498
branch
2 times, most recently
from
August 11, 2026 21:43
28f216f to
1c943e5
Compare
jrdh
marked this pull request as ready for review
August 11, 2026 22:04
9 tasks
jrdh
force-pushed
the
fix/cdd-3506-based-on-3498
branch
from
August 19, 2026 20:07
1c943e5 to
e6bd2b4
Compare
This change adds two filter functions which can query for public and non-public pages using a single query instead of several. The queryset is also not resolved during viewset's `get_queryset` method. The functions use subqueries to ensure the correct pages are filtered in and out of queries. Originally left outer joins was prefered as the best approach, however this proved incompatible with wagtail's search backend framework, whereas subqueries works.
jrdh
force-pushed
the
fix/cdd-3506-based-on-3498
branch
from
August 19, 2026 20:15
e6bd2b4 to
d590a4f
Compare
|
itsthatianguy
approved these changes
Aug 25, 2026
mattjreynolds
approved these changes
Aug 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Filter pages querysets more efficiently. This change adds two filter functions which can query for public and non-public pages using a single query instead of several. The queryset is also not resolved during viewset's
get_querysetmethod.The functions use subqueries to ensure the correct pages are filtered in and out of queries. Originally left outer joins was prefered as the best approach, however this proved incompatible with wagtail's search backend framework, whereas subqueries works.
This supersedes https://github.com/UKHSA-Internal/data-dashboard api/pull/3293 with similar performance (slightly fewer total queries):
list view including public pages:
list view including permitted non-public pages:
Fixes #CDD-3506
Type of change
Please select the options that are relevant.
Checklist: