diff options
author | Christopher Baines <mail@cbaines.net> | 2019-07-27 09:12:25 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-07-27 09:12:25 +0100 |
commit | 75226a1499117d551e859491cc7abcf634d09a98 (patch) | |
tree | 87e3bab32e239641411950ba74983cff5ebd7f9a /guix-data-service/model | |
parent | 7f8ffb4beaf25b02bea601b2a42cea1dc8720e0a (diff) | |
download | data-service-75226a1499117d551e859491cc7abcf634d09a98.tar data-service-75226a1499117d551e859491cc7abcf634d09a98.tar.gz |
Fix the latest-processed-revision pages
Diffstat (limited to 'guix-data-service/model')
-rw-r--r-- | guix-data-service/model/git-branch.scm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/guix-data-service/model/git-branch.scm b/guix-data-service/model/git-branch.scm index 5fe1bb5..37c83d6 100644 --- a/guix-data-service/model/git-branch.scm +++ b/guix-data-service/model/git-branch.scm @@ -96,20 +96,21 @@ WHERE git_branches.commit = $1") query (list branch-name git-repository-id)))) -(define* (latest-processed-commit-for-branch conn branch-name) +(define* (latest-processed-commit-for-branch conn repository-id branch-name) (define query (string-append "SELECT git_branches.commit " "FROM git_branches " "INNER JOIN guix_revisions ON git_branches.commit = guix_revisions.commit " - "WHERE git_branches.name = $1 " + "WHERE guix_revisions.git_repository_id = $1 AND " + "git_branches.git_repository_id = $1 AND git_branches.name = $2 " "ORDER BY datetime DESC " "LIMIT 1")) (match (exec-query conn query - (list branch-name)) + (list repository-id branch-name)) (((commit-hash)) commit-hash) ('() |