aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2024-05-30 21:10:34 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2024-05-30 21:10:34 +0300
commit196644482f58e91b413d50bc7bc8065cc001db75 (patch)
treed7fa5dcb0aa5329d42423de8f0bcc18554f31946
parentgo: update dependencies (diff)
downloadsoko-196644482f58e91b413d50bc7bc8065cc001db75.tar.gz
soko-196644482f58e91b413d50bc7bc8065cc001db75.tar.bz2
soko-196644482f58e91b413d50bc7bc8065cc001db75.zip
package/QA report: fix shown values and order
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r--pkg/app/handler/packages/show.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkg/app/handler/packages/show.go b/pkg/app/handler/packages/show.go
index 718a2a6..feaa14f 100644
--- a/pkg/app/handler/packages/show.go
+++ b/pkg/app/handler/packages/show.go
@@ -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"