From a2b020ed3554b47c0b27982cf47431126c103ef4 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 12 Apr 2015 09:50:13 -0500 Subject: Add true parameter to Jinja2 default filter We need this to make it act more like the Django filter, which prints the default value not only when the variable is undefined, but also when it evaluates to being false (such as a None value). Noticed by felixonmars on packages that provided other packages; None was always showing as the comparison operator. More embarrassing is that our file lists were always showing 'None' concatenated onto all directory entries. Signed-off-by: Dan McGee --- templates/packages/details.html.jinja | 4 ++-- templates/packages/details_depend.html.jinja | 6 +++--- templates/packages/details_relatedto.html.jinja | 2 +- templates/packages/files_list.html.jinja | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/packages/details.html.jinja b/templates/packages/details.html.jinja index 2215f8dc..9a72622d 100644 --- a/templates/packages/details.html.jinja +++ b/templates/packages/details.html.jinja @@ -103,7 +103,7 @@ {% endif %} Description: - {{ pkg.pkgdesc|default("") }} + {{ pkg.pkgdesc|default("", true) }} Upstream URL: {% if pkg.url %}