From f0e29038bf57261c15897b4b10eb4fdf80590c28 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 21 Feb 2020 10:05:18 -0500 Subject: [PATCH] ref: fix scope of artifact listing --- gitsrht/blueprints/repo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py index bf23fd1..d3cdf61 100644 --- a/gitsrht/blueprints/repo.py +++ b/gitsrht/blueprints/repo.py @@ -517,7 +517,8 @@ def ref(owner, repo, ref): owner=owner, repo=repo.name, ref=tag.id.hex)) artifacts = (Artifact.query .filter(Artifact.user_id == repo.owner_id) - .filter(Artifact.repo_id == repo.id)).all() + .filter(Artifact.repo_id == repo.id) + .filter(Artifact.commit == tag.id.hex)).all() return render_template("ref.html", view="refs", owner=owner, repo=repo, git_repo=git_repo, tag=tag, artifacts=artifacts) -- 2.38.4