Guard against derivation IDs that aren't numbers

I saw an error suggesting that something came back that wasn't a number, and
this should give a more informative error.
This commit is contained in:
Christopher Baines 2020-10-09 19:27:04 +01:00
parent f1eb2d3bd2
commit 2c463fcdab

View file

@ -493,6 +493,11 @@ WHERE NOT EXISTS (
0 0
(map (map
(lambda (derivation-id) (lambda (derivation-id)
(unless (string->number derivation-id)
(error
(simple-format #f "derivation-id: ~A is not a number"
derivation-id)))
(with-thread-postgresql-connection (with-thread-postgresql-connection
(lambda (conn) (lambda (conn)
(with-postgresql-transaction (with-postgresql-transaction