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
conn
#:file-names derivation-file-names
#:systems systems
#:targets targets
#:build-statuses build-statuses)))
#:systems (if (null? systems) #f systems)
#:targets (if (null? targets) #f targets)
#:build-statuses (if (null? build-statuses) #f build-statuses))))
derivation-data))
(define (package-data-vhash->package-name-and-version-vhash vhash)

View file

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