aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-03-09 14:05:41 +0000
committerChristopher Baines <mail@cbaines.net>2023-03-09 14:05:41 +0000
commita20b929e90e5a8f3ff7befff642017d86492017d (patch)
tree4017f0e4f919d9f30bcc85f0aae549e70b6dc018
parent519f0c6f67f852ec89b3c9ef87395800452ba61a (diff)
downloaddata-service-a20b929e90e5a8f3ff7befff642017d86492017d.tar
data-service-a20b929e90e5a8f3ff7befff642017d86492017d.tar.gz
Fix query in get-count-for-next-level
-rw-r--r--guix-data-service/model/guix-revision-package-derivation.scm11
1 files changed, 7 insertions, 4 deletions
diff --git a/guix-data-service/model/guix-revision-package-derivation.scm b/guix-data-service/model/guix-revision-package-derivation.scm
index cb73114..2b0ed61 100644
--- a/guix-data-service/model/guix-revision-package-derivation.scm
+++ b/guix-data-service/model/guix-revision-package-derivation.scm
@@ -58,7 +58,7 @@ INNER JOIN guix_revision_package_derivations
WHERE revision_id = $1"
(list guix-revision-id)))
- (define (get-count-for-next-level system target level-counts)
+ (define (get-count-for-next-level system-id target level-counts)
(define next-level
(length level-counts))
@@ -73,10 +73,13 @@ WITH l0 AS (
INNER JOIN guix_revision_package_derivations
ON package_derivations.id
= guix_revision_package_derivations.package_derivation_id
- WHERE revision_id = 19411
- AND system_id = 4
- AND target = $STR$$STR$~A
+ WHERE revision_id = ~A
+ AND system_id = ~A
+ AND target = $STR$~A$STR$~A
)"
+ guix-revision-id
+ system-id
+ target
(if (= next-level 0)
""
(simple-format