Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimise VersionForDocumentValidator query
We found that in `StateForDocumentValidator`, `order(nil).first` was causing a query to take a long time to complete (~15s). We only needed the ID for the record and found that using `pick(:id)` brought the query time down below a second, so we're doing the same in this validator, which has an equivalent requirement
- Loading branch information