From 9aecfdb4a2c25b6c57c2f9c4b490322a9e567869 Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Apr 11 2016 14:27:26 +0000 Subject: fix some misnamed variables to get everything displaying properly * when hacking on this, i changed a variablename from "reference" to theobject, but i missed changing one instance of it. * made the date human readable, as not everyone can parse an epoch timestamp * fixed a wrong dict reference in the template from tag to tagname --- diff --git a/pagure/lib/git.py b/pagure/lib/git.py index f287a4c..92f863f 100644 --- a/pagure/lib/git.py +++ b/pagure/lib/git.py @@ -1256,7 +1256,7 @@ def get_git_tags_objects(project): if isinstance(theobject, pygit2.Tag): commit_time = theobject.get_object().commit_time objecttype = "tag" - elif isinstance(reference, pygit2.Commit): + elif isinstance(theobject, pygit2.Commit): commit_time = theobject.commit_time objecttype = "commit" diff --git a/pagure/templates/releases.html b/pagure/templates/releases.html index 7d96d75..16b5cf4 100644 --- a/pagure/templates/releases.html +++ b/pagure/templates/releases.html @@ -36,12 +36,12 @@ -
{{tag['date'] }} +
{{tag['date'] | humanize}} {{ tag['object'].oid | short }}
{% if tag['objecttype'] == "tag" %} {% if tag['object'].message %} - {{tag['name']}} + {{tag['tagname']}} {{ tag['object'].message.split('\n')[0] }} {% set detailtext = tag['object'].message.partition('\n')[2] %} {% if detailtext != "" %} @@ -51,7 +51,7 @@ {% endif %} {% endif %} {% else %} - {{tag['name']}} + {{tag['tagname']}} {% endif %}
{% endfor %}