Fixed #385 -- Fixed bug in yesno template filter. Thanks, eugene@lazutkin.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@582 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
9635ac07a5
commit
dbc4adeeda
|
@ -368,7 +368,7 @@ def yesno(value, arg):
|
||||||
try:
|
try:
|
||||||
yes, no, maybe = bits
|
yes, no, maybe = bits
|
||||||
except ValueError: # unpack list of wrong size (no "maybe" value provided)
|
except ValueError: # unpack list of wrong size (no "maybe" value provided)
|
||||||
yes, no, maybe = bits, bits[1]
|
yes, no, maybe = bits, bits[1], bits[1]
|
||||||
if value is None:
|
if value is None:
|
||||||
return maybe
|
return maybe
|
||||||
if value:
|
if value:
|
||||||
|
|
Loading…
Reference in New Issue