M gitsrht/blueprints/repo.py => gitsrht/blueprints/repo.py +1 -1
@@ 560,7 560,7 @@ def refs_rss(owner, repo):
def _ref_sort_key(ref):
target = git_repo.get(ref.target)
- author = target.author if hasattr(target, 'author') else target.tagger
+ author = target.author if hasattr(target, 'author') else target.get_object().author
return author.time + author.offset
references = sorted(references, key=_ref_sort_key, reverse=True)[:20]
M gitsrht/git.py => gitsrht/git.py +1 -1
@@ 12,7 12,7 @@ def trim_commit(msg):
return msg[:msg.index("\n")]
def commit_time(commit):
- author = commit.author if hasattr(commit, 'author') else commit.tagger
+ author = commit.author if hasattr(commit, 'author') else commit.get_object().author
# Time handling in python is so dumb
try:
tzinfo = timezone(timedelta(minutes=author.offset))
M => +1 -1
@@ 45,7 45,7 @@ def ref_to_item(repo, reference):
with GitRepository(repo.path) as git_repo:
target = git_repo.get(reference.target)
author = target.author if hasattr(target, 'author') else target.tagger
author = target.author if hasattr(target, 'author') else target.get_object().author
time = aware_time(author).strftime(RFC_822_FORMAT)
url = ref_url(repo, reference)
description = target.message.strip().replace("\n", "<br />")