From 119b814877b10ad5ca6758c2228e75128ad7f2a1 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 26 Sep 2025 10:06:36 +0100 Subject: [PATCH] Try to avoid an error probably associated with empty package licenses --- guix-data-service/model/license-set.scm | 4 +++- tests/model-license-set.scm | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/guix-data-service/model/license-set.scm b/guix-data-service/model/license-set.scm index fe4272b..8436875 100644 --- a/guix-data-service/model/license-set.scm +++ b/guix-data-service/model/license-set.scm @@ -32,5 +32,7 @@ '(license_ids) (vector-map (lambda (_ license-ids) - (list (sort license-ids <))) + (if (= 0 (vector-length license-ids)) + (list (cons "integer[]" license-ids)) + (list (sort license-ids <)))) license-id-lists))) diff --git a/tests/model-license-set.scm b/tests/model-license-set.scm index 38a86de..24cb4e1 100644 --- a/tests/model-license-set.scm +++ b/tests/model-license-set.scm @@ -17,7 +17,8 @@ #f) ("License 2" #f - #f)))) + #f)) + ())) (with-postgresql-connection "test-model-license-set"