diff --git a/guix-data-service/branch-updated-emails.scm b/guix-data-service/branch-updated-emails.scm index aeb1570..2c0e992 100644 --- a/guix-data-service/branch-updated-emails.scm +++ b/guix-data-service/branch-updated-emails.scm @@ -59,12 +59,10 @@ conn git-repository-id))) (let ((excluded-branch? - (branch-in-list? excluded-branches branch-name)) - (included-branch? - (branch-in-list? included-branches branch-name))) + (branch-in-list? excluded-branches branch-name))) (when (and (not excluded-branch?) - (or (null? included-branches) - included-branch?)) + (or (NULL? included-branches) + (branch-in-list? included-branches branch-name))) (if (string=? commit-all-zeros x-git-newrev) (insert-git-commit-entry conn (or (git-branch-for-repository-and-name diff --git a/guix-data-service/model/git-repository.scm b/guix-data-service/model/git-repository.scm index c05376f..b5f9fbe 100644 --- a/guix-data-service/model/git-repository.scm +++ b/guix-data-service/model/git-repository.scm @@ -139,7 +139,7 @@ WHERE id = $1" item)) lst)) - (match (exec-query + (match (exec-query-with-null-handling conn " SELECT included_branches, excluded_branches @@ -147,13 +147,11 @@ FROM git_repositories WHERE id = $1" (list (number->string id))) (((included_branches excluded_branches)) (values - (if (or (eq? #f included_branches) - (string-null? included_branches)) - '() + (if (NULL? included_branches) + included_branches (make-regexes (parse-postgresql-array-string included_branches))) - (if (or (eq? excluded_branches #f) - (string-null? excluded_branches)) + (if (NULL? excluded_branches) '() (make-regexes (parse-postgresql-array-string excluded_branches))))))) diff --git a/guix-data-service/poll-git-repository.scm b/guix-data-service/poll-git-repository.scm index 8dfd13d..bff0de0 100644 --- a/guix-data-service/poll-git-repository.scm +++ b/guix-data-service/poll-git-repository.scm @@ -182,12 +182,10 @@ (filter (lambda (branch-name) (let ((excluded-branch? - (branch-in-list? excluded-branches branch-name)) - (included-branch? - (branch-in-list? included-branches branch-name))) + (branch-in-list? excluded-branches branch-name))) (and (not excluded-branch?) - (or (null? included-branches) - included-branch?)))) + (or (NULL? included-branches) + (branch-in-list? included-branches branch-name))))) (delete-duplicates! (append! (map car repository-branches)