From b4f34988f6b0fa770756ab8531590e3a0657d1a3 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sat, 22 Sep 2018 13:59:50 -0400 Subject: [PATCH] Fix issue when commit cannot be found --- gitsrht/git.py | 1 + gitsrht/templates/blob.html | 2 ++ 2 files changed, 3 insertions(+) diff --git a/gitsrht/git.py b/gitsrht/git.py index b254360..ac00fef 100644 --- a/gitsrht/git.py +++ b/gitsrht/git.py @@ -48,6 +48,7 @@ class AnnotatedTreeEntry: def __init__(self, repo, entry): self._entry = entry self._repo = repo + self.commit = None if entry: self.id = entry.id.hex self.name = entry.name diff --git a/gitsrht/templates/blob.html b/gitsrht/templates/blob.html index 0e1f65b..b015c98 100644 --- a/gitsrht/templates/blob.html +++ b/gitsrht/templates/blob.html @@ -32,6 +32,7 @@ + {% if commit %}
{{commit.id.hex[:8]}}{{commit.author.name}}: @@ -41,6 +42,7 @@
+ {% endif %}
-- 2.38.4