From 879349ec9fc626a028ec46eebeaa0fbe3588acc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= Date: Tue, 20 Jun 2023 21:05:21 +0300 Subject: [PATCH 1/1] Commit lookup doesn't quite work on a comment page Need to check the reference lookup and rendering. --- feeds.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/feeds.py b/feeds.py index 49c9776..2e2e153 100644 --- a/feeds.py +++ b/feeds.py @@ -288,13 +288,14 @@ def make_post_page(session, post): if post.issueid: repo = db.get_repository(subspace=session.context) commits = db.get_commits(repo, issueid=post.issueid) - incoming_xrefs = db.get_issue_crossrefs(session.context, - incoming_to_issueid=post.issueid) - outgoing_xrefs = db.get_issue_crossrefs(session.context, - outgoing_from_issueid=post.issueid) + if not is_comment_page: + incoming_xrefs = db.get_issue_crossrefs(session.context, + incoming_to_issueid=post.issueid) + outgoing_xrefs = db.get_issue_crossrefs(session.context, + outgoing_from_issueid=post.issueid) # Issue and commit cross references outgoing from the post body. - if repo.view_url: + if repo and repo.view_url: first = True for commit in db.find_commits_by_hash(repo, parse_likely_commit_hashes(page)): if first: -- 2.34.1