aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-10-17 21:24:48 +0100
committerChristopher Baines <mail@cbaines.net>2019-10-17 21:24:48 +0100
commitb36294da4abe8a3550d9b8e48335f545f7e9d9eb (patch)
tree2b3a715aa16c8fc6bbc020fc6c811d5275dffa74
parent818be2ed9895645ba06963defeb10d395bf14a1e (diff)
downloaddata-service-b36294da4abe8a3550d9b8e48335f545f7e9d9eb.tar
data-service-b36294da4abe8a3550d9b8e48335f545f7e9d9eb.tar.gz
Fix some missing branch constraints in package-versions-for-branch
The lack of these meant that versions on other branches could appear in the results.
-rw-r--r--guix-data-service/model/package.scm2
1 files changed, 2 insertions, 0 deletions
diff --git a/guix-data-service/model/package.scm b/guix-data-service/model/package.scm
index 6b2680f..c1cd2ae 100644
--- a/guix-data-service/model/package.scm
+++ b/guix-data-service/model/package.scm
@@ -229,6 +229,8 @@ INNER JOIN git_branches AS last_git_branches
WHERE package_name = $1
AND package_versions_by_guix_revision_range.git_repository_id = $2
AND package_versions_by_guix_revision_range.branch_name = $3
+AND first_git_branches.name = $3
+AND last_git_branches.name = $3
ORDER BY first_datetime DESC, package_version DESC"
(list package-name
(number->string git-repository-id)