Add an option for turning distinct off when querying review requests.
Review Request #13370 — Created Oct. 23, 2023 and submitted — Latest diff uploaded
This adds a
distinct
option forReviewRequest.objects._query
and all
wrapping functions, allowing callers to query review requests without
distinct. When distinct is turned on (which is still the default for
now), it can impact how queries are built, breaking.count()
for
instance.A future version of Review Board is likely to switch the default for
distinct
toFalse
, but this will require further testing.The
_query()
function was given type hints in the process, to help
with the implementation of the function. Work has not been done on the
wrapping functions to provide type hints.
Unit tests pass.
Tested this with some in-progress code to simplify queries for the
datagrid pagination.