guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/04: Improve filtering for no target


From: Christopher Baines
Subject: 01/04: Improve filtering for no target
Date: Tue, 31 Mar 2020 15:51:15 -0400 (EDT)

cbaines pushed a commit to branch master
in repository data-service.

commit 63d7af93404d5b489fb2807b98542a45e6f5c599
Author: Christopher Baines <address@hidden>
AuthorDate: Tue Mar 31 18:58:36 2020 +0100

    Improve filtering for no target
    
    Previously, the select option label was empty that's not particularly
    informative. These changes also fix the next page link behaviour for the
    target parameter.
---
 guix-data-service/web/query-parameters.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/guix-data-service/web/query-parameters.scm 
b/guix-data-service/web/query-parameters.scm
index 6679711..3b0953a 100644
--- a/guix-data-service/web/query-parameters.scm
+++ b/guix-data-service/web/query-parameters.scm
@@ -185,6 +185,9 @@
       (#t "on")
       ((? date? date)
        (date->string date "~1 ~3"))
+      ;; TODO Hardcoding none here is a bit of a hack, but it does make the
+      ;; Next page link work for revision derivations.
+      ("" "none")
       (other other)))
 
   (string-join
@@ -231,7 +234,7 @@
       target))
 
 (define (valid-targets->options targets)
-  `(("" . "none")
+  `(("(no target)" . "none")
     ,@(map (lambda (target)
              (cons target target))
            targets)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]