From 69e2dd1555cfd46debb1d27364775fbf55401e62 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 23 Sep 2021 10:23:30 +0200 Subject: [PATCH] Fix issue with repos without tags --- gitsrht/blueprints/repo.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py index 2362d92..78a2dc9 100644 --- a/gitsrht/blueprints/repo.py +++ b/gitsrht/blueprints/repo.py @@ -132,9 +132,13 @@ def summary(owner, repo): break message = session.pop("message", None) + if latest_tag: + sig = lookup_signature(git_repo, latest_tag[0].decode('utf-8'))[1] + else: + sig = None return render_template("summary.html", view="summary", owner=owner, repo=repo, readme=readme, commits=commits, - signature=lookup_signature(git_repo, latest_tag[0].decode('utf-8'))[1], + signature=sig, latest_tag=latest_tag, default_branch=default_branch, is_annotated=lambda t: isinstance(t, pygit2.Tag), message=message, license=license) -- 2.38.4