Commit bd75092f authored by Amos Latteier's avatar Amos Latteier

Fixed a bug in the dtml-var tag handling of the 'null' attribute. Before null...

Fixed a bug in the dtml-var tag handling of the 'null' attribute. Before null would only work correctly if there was also a 'fmt' attribute. Now null correctly works with non-zero false values when there isn't a 'fmt' option.
parent bd7fc116
......@@ -217,8 +217,8 @@ Evaluating expressions without rendering results
''' # '
__rcs_id__='$Id: DT_Var.py,v 1.35 1999/12/01 23:48:56 jim Exp $'
__version__='$Revision: 1.35 $'[11:-2]
__rcs_id__='$Id: DT_Var.py,v 1.36 2000/08/31 23:57:02 amos Exp $'
__version__='$Revision: 1.36 $'[11:-2]
from DT_Util import parse_params, name_param, html_quote, str
import regex, string, sys, regex
......@@ -280,7 +280,7 @@ class Var:
__traceback_info__=name, val, args
if val is None and have_arg('null'):
if val is None or (not val and val != 0) and have_arg('null'):
# Treat None as special case wrt null
return args['null']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment