Commit 7cc05d8f authored by Yusei Tahara's avatar Yusei Tahara

patches: Fix sqlvar monkey patch for Zope2.

<dtml-sqlvar "None" type=nb> should be 'null'.
parent af4660d9
...@@ -71,6 +71,8 @@ if IS_ZOPE2: # BBB Zope2 ...@@ -71,6 +71,8 @@ if IS_ZOPE2: # BBB Zope2
('.%06u' % (v.micros() % 1000000))[:1+n] if n else '') ('.%06u' % (v.micros() % 1000000))[:1+n] if n else '')
except Exception: except Exception:
t = 'datetime' t = 'datetime'
elif t=='nb' and v is None:
return 'null'
elif t=='nb' and not v: elif t=='nb' and not v:
t = 'empty string' t = 'empty string'
else: else:
......
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