Commit ae7f0809 authored by Yusei Tahara's avatar Yusei Tahara

patches: Fix sqlvar monkey patch bug for Zope2.

<dtml-sqlvar "None" type=string> should be 'null', not 'None'.
parent 8e56f434
...@@ -74,6 +74,8 @@ if IS_ZOPE2: # BBB Zope2 ...@@ -74,6 +74,8 @@ if IS_ZOPE2: # BBB Zope2
elif t=='nb' and not v: elif t=='nb' and not v:
t = 'empty string' t = 'empty string'
else: else:
if v is None:
return 'null'
v = md.getitem('sql_quote__',0)( v = md.getitem('sql_quote__',0)(
v if isinstance(v, basestring) else str(v)) v if isinstance(v, basestring) else str(v))
#if find(v,"\'") >= 0: v=join(split(v,"\'"),"''") #if find(v,"\'") >= 0: v=join(split(v,"\'"),"''")
......
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