From 68850065d79ba05dad7201c3ed22f5e2e32680b7 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 22 May 2023 17:34:39 +0100 Subject: [PATCH] Extend the invalid parameter handling for more types --- guix-data-service/web/compare/controller.scm | 21 +++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/guix-data-service/web/compare/controller.scm b/guix-data-service/web/compare/controller.scm index 20ee3b9..366a0bd 100644 --- a/guix-data-service/web/compare/controller.scm +++ b/guix-data-service/web/compare/controller.scm @@ -657,15 +657,18 @@ ((name . val) (cons name - (if (invalid-query-parameter? val) - `((invalid - . ,(with-output-to-string - (lambda () - (sxml->html - (invalid-query-parameter-message - val))))) - (value . ,(invalid-query-parameter-value val))) - val)))) + (cond + ((invalid-query-parameter? val) + `((invalid + . ,(with-output-to-string + (lambda () + (sxml->html + (invalid-query-parameter-message + val))))) + (value . ,(invalid-query-parameter-value val)))) + ((list? val) + (list->vector val)) + (else val))))) query-parameters))))) (else (letpar& ((systems