Commit 4f07194d authored by Jérome Perrin's avatar Jérome Perrin

sqlvar py3 ( to check )

parent 4631a0cf
...@@ -110,13 +110,13 @@ else: # For easy diff with original (ZSQLMethods 3.14) ...@@ -110,13 +110,13 @@ else: # For easy diff with original (ZSQLMethods 3.14)
v = expr(md) v = expr(md)
except Exception: except Exception:
if 'optional' in args and args['optional']: if 'optional' in args and args['optional']:
return 'null' return b'null'
if not isinstance(expr, StringTypes): if not isinstance(expr, StringTypes):
raise raise
raise ValueError('Missing input variable, <em>%s</em>' % name) raise ValueError('Missing input variable, <em>%s</em>' % name)
if v is None: if v is None:
return 'null' return b'null'
if t == 'int': if t == 'int':
try: try:
...@@ -162,7 +162,7 @@ else: # For easy diff with original (ZSQLMethods 3.14) ...@@ -162,7 +162,7 @@ else: # For easy diff with original (ZSQLMethods 3.14)
v = str(v) v = str(v)
if not v and 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 b'null'
else: else:
err = 'Invalid empty string value for <em>%s</em>' % name err = 'Invalid empty string value for <em>%s</em>' % name
raise ValueError(err) raise ValueError(err)
......
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