Skip to content

Commit

Permalink
Fixed a bug in the dtml-var tag handling of the 'null' attribute. Bef…
Browse files Browse the repository at this point in the history
…ore 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.
  • Loading branch information
latteier committed Aug 31, 2000
1 parent e5cf2e3 commit 3454629
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions DT_Var.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@
''' # '
__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
Expand Down Expand Up @@ -280,7 +280,7 @@ def render(self, md):

__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']

Expand Down

0 comments on commit 3454629

Please sign in to comment.