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.
This commit is contained in:
Christopher Baines 2019-07-12 19:50:48 +01:00
parent 28baed2667
commit 8f956aa6c2

View file

@ -37,10 +37,13 @@ FROM license_sets")
(exec-query->vhash conn (exec-query->vhash conn
select-license-sets select-license-sets
(lambda (results) (lambda (results)
(string-split (string-drop-right (if (string=? (second results) "{}")
(string-drop (second results) 1) '()
1) (string-split
#\,)) (string-drop-right
(string-drop (second results) 1)
1)
#\,)))
first)) ;; id first)) ;; id
(missing-license-sets (missing-license-sets
(delete-duplicates (delete-duplicates