From ead0b09aa16406fc8e7fd510be39cea1d3ac7679 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sat, 10 Oct 2020 13:07:16 -0400 Subject: [PATCH] blame: fix case where hunk.final_committer is None Found via mutt/pop_auth.c @ 34ba89ecec196b7623fbe14a9f2de3d4350f6a34, "Add missing full stops in smime_keys.man page". --- gitsrht/templates/blame.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gitsrht/templates/blame.html b/gitsrht/templates/blame.html index 295902e..8f57d21 100755 --- a/gitsrht/templates/blame.html +++ b/gitsrht/templates/blame.html @@ -55,7 +55,11 @@ pre, body {
         {%- for hunk in blame %}
           {%- set lns.line_count = lns.line_count + hunk.lines_in_hunk -%}
+          {%- if hunk.final_committer -%}
           {%- set final_user = lookup_user(hunk.final_committer.email) -%}
+          {%- else -%}
+          {%- set final_user = None -%}
+          {%- endif -%}
           
{# #}