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)