Commit ebdc34d4 authored by Yusei Tahara's avatar Yusei Tahara

patches: Fix a bug on sqlvar type="nb".

parent 110b151e
...@@ -153,14 +153,10 @@ else: # For easy diff with original (ZSQLMethods 3.14) ...@@ -153,14 +153,10 @@ else: # For easy diff with original (ZSQLMethods 3.14)
('.%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 not v:
t = 'empty string'
else: else:
if not isinstance(v, (str, StringTypes)): if not isinstance(v, (str, StringTypes)):
v = str(v) v = str(v)
if t == 'nb': if not v and t == 'nb':
if 'optional' in args and args['optional']: if 'optional' in args and args['optional']:
return 'null' return 'null'
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