From 4b5db1645710839bf1e0932141f6d4d44369397b Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 8 Jul 2021 10:01:38 -0400 Subject: [PATCH] Fix error with unannotated tags --- gitsrht/blueprints/repo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py index ee72f3e..a078fb8 100644 --- a/gitsrht/blueprints/repo.py +++ b/gitsrht/blueprints/repo.py @@ -108,7 +108,7 @@ def summary(owner, repo): if ref.startswith(b"refs/tags/")] tags = [tag for tag in tags if (isinstance(tag[1], pygit2.Tag) or isinstance(tag[1], pygit2.Commit)) - and isinstance(tag[1].get_object(), pygit2.Commit)] + and (isinstance(tag[1], pygit2.Commit) or isinstance(tag[1].get_object(), pygit2.Commit))] tags = sorted(tags, key=lambda c: commit_time(c[1]), reverse=True) latest_tag = tags[0] if len(tags) else None -- 2.38.4