forked from extern/django-helpdesk
Merge pull request #156 from URpages/master
Make sure that blank strings do not kill in_list. Also fixes #107.
This commit is contained in:
commit
4736ef3c98
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user