diff options
author | Christopher Baines <mail@cbaines.net> | 2020-06-19 14:12:24 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-06-19 14:12:56 +0100 |
commit | 308e553b11792bc2c06320ac970a06eb2e8a3447 (patch) | |
tree | 0bccaab63cc5c69b835fd89be943b10f42d60565 | |
parent | 480d718fa8a6d8e5b4e84703b5ca84669bb8a38f (diff) | |
download | data-service-308e553b11792bc2c06320ac970a06eb2e8a3447.tar data-service-308e553b11792bc2c06320ac970a06eb2e8a3447.tar.gz |
Guard against some changes in how guile-json represents null values
-rw-r--r-- | guix-data-service/model/channel-instance.scm | 2 | ||||
-rw-r--r-- | guix-data-service/model/derivation.scm | 2 | ||||
-rw-r--r-- | guix-data-service/model/package.scm | 6 | ||||
-rw-r--r-- | guix-data-service/model/system-test.scm | 2 |
4 files changed, 5 insertions, 7 deletions
diff --git a/guix-data-service/model/channel-instance.scm b/guix-data-service/model/channel-instance.scm index 50ee864..1985cd3 100644 --- a/guix-data-service/model/channel-instance.scm +++ b/guix-data-service/model/channel-instance.scm @@ -94,7 +94,7 @@ ORDER BY channel_instances.system DESC") (list system derivation_file_name (filter (lambda (build) - (assoc-ref build "status")) + (string? (assoc-ref build "status"))) (vector->list (json-string->scm builds-json)))))) (exec-query conn query (list commit-hash)))) diff --git a/guix-data-service/model/derivation.scm b/guix-data-service/model/derivation.scm index a19b336..9687ede 100644 --- a/guix-data-service/model/derivation.scm +++ b/guix-data-service/model/derivation.scm @@ -179,7 +179,7 @@ ORDER BY derivations.system DESC, target file-name (filter (lambda (build) - (assoc-ref build "status")) + (string? (assoc-ref build "status"))) (vector->list (json-string->scm builds-json))))) ((file_name system target) diff --git a/guix-data-service/model/package.scm b/guix-data-service/model/package.scm index 0f68539..01ba65a 100644 --- a/guix-data-service/model/package.scm +++ b/guix-data-service/model/package.scm @@ -346,8 +346,7 @@ ORDER BY first_datetime DESC, package_version DESC") (if (string-null? builds-json) '() (filter (lambda (build) - (not (eq? (assoc-ref build "build_server_id") - #nil))) + (number? (assoc-ref build "build_server_id"))) (vector->list (json-string->scm builds-json))))))) (exec-query @@ -462,8 +461,7 @@ ORDER BY first_datetime DESC, package_version DESC") (if (string-null? builds-json) '() (filter (lambda (build) - (not (eq? (assoc-ref build "build_server_id") - #nil))) + (number? (assoc-ref build "build_server_id"))) (vector->list (json-string->scm builds-json))))))) (exec-query diff --git a/guix-data-service/model/system-test.scm b/guix-data-service/model/system-test.scm index 665eff2..7ac55e8 100644 --- a/guix-data-service/model/system-test.scm +++ b/guix-data-service/model/system-test.scm @@ -136,7 +136,7 @@ ORDER BY name ASC") (string->number column_number) derivation_file_name (filter (lambda (build) - (assoc-ref build "status")) + (string? (assoc-ref build "status"))) (vector->list (json-string->scm builds-json)))))) (exec-query conn query (list system commit-hash)))) |