Skip to content

Commit

Permalink
package/QA report: fix shown values and order
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
  • Loading branch information
arthurzam committed May 30, 2024
1 parent 72ff41c commit 1966444
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/app/handler/packages/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,12 @@ func Show(w http.ResponseWriter, r *http.Request) {
case "qa-report":
currentSubTab = "QA report"
query = query.
Relation("PkgCheckResults").
Relation("Versions.PkgCheckResults")
Relation("PkgCheckResults", func(q *pg.Query) (*pg.Query, error) {
return q.Where("version IS NULL").Order("class", "message"), nil
}).
Relation("Versions.PkgCheckResults", func(q *pg.Query) (*pg.Query, error) {
return q.Order("version", "class", "message"), nil
})
case "pull-requests":
atom = strings.ReplaceAll(atom, "/pull-requests", "")
currentSubTab = "Pull requests"
Expand Down

0 comments on commit 1966444

Please sign in to comment.