mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2024-12-13 18:31:10 +01:00
make sure that blank strings do not kill in_list
This commit is contained in:
parent
3785ca4477
commit
637130b2da
@ -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