Fix excess queries and audit code for the datagrids.
Review Request #13366 — Created Oct. 22, 2023 and submitted
The new query tests for the datagrids unveiled a number of excess
queries when working with Local Sites. We were querying one Local Site
per row when viewing any review request datagrid on a Local Site. This
was due to the lack of any
This change fixes that, significantly reducing the overhead and the
removing the padded excess queries in the unit tests.
In the process, I've audited the code, cleaned up some calls to help
avoid potential problems down the road, and reduced additional queries
that involved Local Sites, helping keep queries simpler on a standard
Unit tests pass.
Tested all the datagrids, making sure there were no apparent regressions.
Revision 2 (+914 -658)
Checks run (2 succeeded)