Preemptively evaluate values_list queries during counter field updates.
Review Request #12700 — Created Oct. 27, 2022 and submitted
We had a couple places when updating review request counters where we'd
values_listof PKs, and then pass that directly into future
queries, which would end up evaluating them as subqueries. This has two
problems--first, we end up running the subqueries multiple times, and
second, it's impossible to use
This change fixes those up. There are still cases where we have
subqueries that are added by Django's
this handles the stuff in our own code.
assertQueriesusage that we no longer had subqueries for