1
0
Fork 0
forked from infra/ansible

pagure: hotfix for commit hash

Signed-off-by: James Antill <james@and.org>
This commit is contained in:
James Antill 2026-05-27 14:20:49 -04:00 committed by Kevin Fenzi
commit 40b3225890

View file

@ -0,0 +1,18 @@
diff --git a/pagure/ui/filters.py b/pagure/ui/filters.py
index 17a97160..e5a1ef1d 100644
--- a/pagure/ui/filters.py 2024-05-24 10:43:47.000000000 -0400
+++ b/pagure/ui/filters.py 2026-05-19 17:56:07.900604131 -0400
@@ -144,8 +144,11 @@
output = ['<div class="highlight">', '<table class="code_table">']
commit_hash = commit
- if hasattr(commit_hash, "hex"):
+ # This can traceback, so try/except
+ try:
commit_hash = commit_hash.hex
+ except:
+ commit_hash = commit
comments = {}
if prequest and not isinstance(prequest, flask.wrappers.Request):
Only in pagure-5.14.1-build-new/pagure-5.14.1/pagure/ui: filters.py~