diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2019-05-21 11:38:15 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2019-05-21 11:38:15 +0200 |
commit | 74b8945f2b73631a2ac5bc54fda08cacd91f24d0 (patch) | |
tree | 1eee64e1ef3134a18ba307ae413d3dbffb4b6179 | |
parent | 965bace6634e97921e9288a0d204de9de509a001 (diff) | |
download | cuirass-74b8945f2b73631a2ac5bc54fda08cacd91f24d0.tar cuirass-74b8945f2b73631a2ac5bc54fda08cacd91f24d0.tar.gz |
http: Gracefully handle missing query.
* src/cuirass/http.scm (url-handler): Skip computation of builds-id-min and
builds-id-max when query is missing.
-rw-r--r-- | src/cuirass/http.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm index 48a2b39..94a2f25 100644 --- a/src/cuirass/http.scm +++ b/src/cuirass/http.scm @@ -351,9 +351,9 @@ Hydra format." (("search") (let* ((params (request-parameters request)) - (query (assq-ref params 'query)) - (builds-id-min (db-get-builds-query-min query)) - (builds-id-max (db-get-builds-query-max query)) + (query (and=> (assq-ref params 'query) uri-decode)) + (builds-id-min (and=> query db-get-builds-query-min)) + (builds-id-max (and=> query db-get-builds-query-max)) (border-low-id (assq-ref params 'border-low-id)) (border-high-id (assq-ref params 'border-high-id))) (if query |