##{{patch}}##
+
{% autoescape false %}
{{ patch | patch_to_diff | html_diff | format_loc(
- filename=patch.new_file_path,
- commit=patch.new_id or patch.new_oid,
+ filename=patch_new_file_path,
+ commit=patch_new_id,
prequest=pull_request,
index=loop.index)}}
{% endautoescape %}
diff --git a/pagure/ui/filters.py b/pagure/ui/filters.py
index e5a424e..056756c 100644
--- a/pagure/ui/filters.py
+++ b/pagure/ui/filters.py
@@ -66,8 +66,8 @@ def format_loc(loc, commit=None, filename=None, prequest=None, index=None):
comments = {}
if prequest and not isinstance(prequest, flask.wrappers.Request):
for com in prequest.comments:
- if commit and com.commit_id == commit \
- and com.filename == filename:
+ if commit and unicode(com.commit_id) == unicode(commit) \
+ and unicode(com.filename) == unicode(filename):
if com.line in comments:
comments[com.line].append(com)
else: