From 8f956aa6c20c093199f028fffec4ae68ef5ddfa9 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 12 Jul 2019 19:50:48 +0100 Subject: [PATCH] Fix a bug where the list of 0 licenses wasn't handled correctly This happened for a package with #f as the licenses. That's incorrect, but try to handle it without erroring. --- guix-data-service/model/license-set.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/guix-data-service/model/license-set.scm b/guix-data-service/model/license-set.scm index 44c0a70..61ded10 100644 --- a/guix-data-service/model/license-set.scm +++ b/guix-data-service/model/license-set.scm @@ -37,10 +37,13 @@ FROM license_sets") (exec-query->vhash conn select-license-sets (lambda (results) - (string-split (string-drop-right - (string-drop (second results) 1) - 1) - #\,)) + (if (string=? (second results) "{}") + '() + (string-split + (string-drop-right + (string-drop (second results) 1) + 1) + #\,))) first)) ;; id (missing-license-sets (delete-duplicates