From 8dfdc5e33514443e463b1accc1053dc986def4d4 Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Sat, 10 Aug 2019 12:01:07 +1000 Subject: Based on #157 and #158, revert back to existence checks and length rather than default empty array initialization for ease of reading --- templates/mod/view_ip.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'templates/mod/view_ip.html') diff --git a/templates/mod/view_ip.html b/templates/mod/view_ip.html index 6735ff6f..20a4573d 100644 --- a/templates/mod/view_ip.html +++ b/templates/mod/view_ip.html @@ -18,7 +18,7 @@ {{ notes|count }} {% trans notes_on_record %} - {% if notes|default([])|length > 0 %} + {% if notes and noteslength > 0 %} @@ -81,7 +81,7 @@ {% endif %} -{% if bans|default([])|length > 0 and mod|hasPermission(config.mod.view_ban) %} +{% if bans and bans|length > 0 and mod|hasPermission(config.mod.view_ban) %}
{% set bans_on_record = 'ban' ~ (bans|count != 1 ? 's' : '') ~ ' on record' %} {{ bans|count }} {% trans bans_on_record %} @@ -174,7 +174,7 @@
{% endif %} -{% if logs|default([])|length > 0 %} +{% if logs and logs|length > 0 %}
History
{% trans 'Staff' %}
-- cgit v1.3