Differentiate filtering better for select-derivations-and-build-status

An empty list of derivation-file-names should result in no results,
but in the case of the systems, targets and build-statuses, we want
all of the results.
This commit is contained in:
Christopher Baines 2019-03-24 10:55:17 +00:00
parent 5be4ebca0c
commit daa2790f59
2 changed files with 4 additions and 4 deletions

View file

@ -114,9 +114,9 @@ ORDER BY base_packages.name DESC, base_packages.version, target_packages.name, t
(select-derivations-and-build-status (select-derivations-and-build-status
conn conn
#:file-names derivation-file-names #:file-names derivation-file-names
#:systems systems #:systems (if (null? systems) #f systems)
#:targets targets #:targets (if (null? targets) #f targets)
#:build-statuses build-statuses))) #:build-statuses (if (null? build-statuses) #f build-statuses))))
derivation-data)) derivation-data))
(define (package-data-vhash->package-name-and-version-vhash vhash) (define (package-data-vhash->package-name-and-version-vhash vhash)

View file

@ -478,7 +478,7 @@ ORDER BY derivations.system DESC,
(string-join (string-join
(filter-map (filter-map
(lambda (field values) (lambda (field values)
(if (and values (not (null? values))) (if values
(string-append (string-append
field " IN (" field " IN ("
(string-join (map (lambda (value) (string-join (map (lambda (value)