fix qa page sorting: (#2530)

was sorting on qa.{qa_run_id} after the value was already replaced with
'qa', thus was sorting on non-existent value
fixes #2529
This commit is contained in:
Ilya Kreymer 2025-04-02 09:25:38 -07:00 committed by GitHub
parent f6481272f4
commit c067a0fe7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -647,8 +647,8 @@ class PageOps:
raise HTTPException(
status_code=400, detail="qa_run_id_missing_for_qa_sort"
)
sort_by = f"qa.{qa_run_id}.{sort_by}"
# note: not using qa.{qa_run_id} because $set above means qa = qa.{qa_run_id}
sort_by = f"qa.{sort_by}"
aggregate.extend([{"$sort": {sort_by: sort_direction}}])