From 637130b2dabf4f30a94c99b9ca1b4e76711a2977 Mon Sep 17 00:00:00 2001 From: Thomas Woolford Date: Wed, 12 Sep 2012 14:15:15 +0930 Subject: [PATCH] make sure that blank strings do not kill in_list --- helpdesk/templatetags/in_list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpdesk/templatetags/in_list.py b/helpdesk/templatetags/in_list.py index 47f0916f..16c3d678 100644 --- a/helpdesk/templatetags/in_list.py +++ b/helpdesk/templatetags/in_list.py @@ -18,7 +18,7 @@ Assuming 'food' = 'pizza' and 'best_foods' = ['pizza', 'pie', 'cake]: from django import template def in_list(value, arg): - return value in arg + return value in ( arg or [] ) register = template.Library() register.filter(in_list)