aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/model/git-repository.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2021-01-02 10:06:27 +0000
committerChristopher Baines <mail@cbaines.net>2021-01-02 10:06:27 +0000
commit64a4058ccece46c89a39c639c1ab509810c2a403 (patch)
treee038aa47000e4ba492a97c18ed76bc7ce0f12e55 /guix-data-service/model/git-repository.scm
parent7df6f92036149db03ab567b36ca53d1270d17c98 (diff)
downloaddata-service-64a4058ccece46c89a39c639c1ab509810c2a403.tar
data-service-64a4058ccece46c89a39c639c1ab509810c2a403.tar.gz
Start to add compatibility with squee returning #f for null values
While maintaining compatibility for older versions of squee.
Diffstat (limited to 'guix-data-service/model/git-repository.scm')
-rw-r--r--guix-data-service/model/git-repository.scm9
1 files changed, 6 insertions, 3 deletions
diff --git a/guix-data-service/model/git-repository.scm b/guix-data-service/model/git-repository.scm
index 4eeb99d..9db682e 100644
--- a/guix-data-service/model/git-repository.scm
+++ b/guix-data-service/model/git-repository.scm
@@ -75,10 +75,12 @@ FROM git_repositories WHERE id = $1"
(list (number->string id)))
(((included_branches excluded_branches))
(values
- (if (string=? included_branches "")
+ (if (or (eq? #f included_branches)
+ (string-null? included_branches))
'()
(parse-postgresql-array-string included_branches))
- (if (string=? excluded_branches "")
+ (if (or (eq? excluded_branches #f)
+ (string-null? excluded_branches))
'()
(parse-postgresql-array-string excluded_branches))))))
@@ -144,7 +146,8 @@ ORDER BY 1 DESC NULLS FIRST, 2 DESC LIMIT 10;")
((id job_id job_events commit source)
(list id
job_id
- (if (string=? "" job_events)
+ (if (or (eq? #f job_events)
+ (string-null? job_events))
'()
(vector->list (json-string->scm job_events)))
commit source)))