aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/datastore
diff options
context:
space:
mode:
Diffstat (limited to 'guix-build-coordinator/datastore')
-rw-r--r--guix-build-coordinator/datastore/sqlite.scm9
1 files changed, 5 insertions, 4 deletions
diff --git a/guix-build-coordinator/datastore/sqlite.scm b/guix-build-coordinator/datastore/sqlite.scm
index 626fd4e..4ecd83e 100644
--- a/guix-build-coordinator/datastore/sqlite.scm
+++ b/guix-build-coordinator/datastore/sqlite.scm
@@ -2025,10 +2025,11 @@ WHERE agent_id = :agent_id"
(slot-ref datastore 'metrics-registry)
"build_allocation_plan_total")))
(metric-set allocation-plan-metric
- (assoc-ref
- (datastore-count-build-allocation-plan-entries
- datastore)
- agent-id)
+ (or (assoc-ref
+ (datastore-count-build-allocation-plan-entries
+ datastore)
+ agent-id)
+ 0)
#:label-values
`((agent_id . ,agent-id)))))