diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html
index 96bd6a1..b0121bd 100644
--- a/pagure/templates/pull_request.html
+++ b/pagure/templates/pull_request.html
@@ -421,13 +421,21 @@
empty file added
{% else %}
- {% if patchtype == "added" and patch.line_stats[1] > 1000 %}
+ {% if patchtype == "added" %}
+ {% if (patch| hasattr('line_stats') and patch.line_stats[1] > 1000)
+ or (patch| hasattr('additions') and patch.additions > 1000) %}
-
View the large added file {{ viewfilelink(patch_new_file_path) }}
+
+ The added file is too large to be shown here, see it at:
+ {{ viewfilelink(patch_new_file_path) }}
+
{% elif patchtype == "removed" %}
-
view the removed file {{ viewfilelink(patch_new_file_path, patch_old_id) }}
+
+ The removed file is too large to be shown here, see it at:
+ {{ viewfilelink(patch_new_file_path, patch_old_id) }}
+
{% else %}
{% autoescape false %}