Handle when there's no system-test-data to insert

Previously it would error in one of the INSERT queries.
This commit is contained in:
Christopher Baines 2020-04-20 08:17:31 +01:00
parent 08eb4731d1
commit fdee09d1c0

View file

@ -30,6 +30,7 @@
(define (insert-system-tests-for-guix-revision conn (define (insert-system-tests-for-guix-revision conn
guix-revision-id guix-revision-id
system-test-data) system-test-data)
(unless (null? system-test-data)
(let* ((system-test-ids (let* ((system-test-ids
(insert-missing-data-and-return-all-ids (insert-missing-data-and-return-all-ids
conn conn
@ -74,7 +75,7 @@ VALUES "
(apply simple-format #f "(~A, ~A, ~A, '~A')" (apply simple-format #f "(~A, ~A, ~A, '~A')"
vals)) vals))
data) data)
", ")))) ", ")))))
#t) #t)
(define (select-system-tests-for-guix-revision conn (define (select-system-tests-for-guix-revision conn