Commit fae19bf9 authored by Vincent Pelletier's avatar Vincent Pelletier

ERP5Type.patches.sqltest: Fix "optional" support when using expression.

expr(md) raises NameError when expr references a non-given argument, so
catch that exception too. (sqlvar catches Exception, which seems overkill,
so don't follow it)
parent effd213f
......@@ -28,7 +28,7 @@ if 1: # For easy diff with original
except KeyError:
except (KeyError, NameError):
if args.has_key('optional') and args['optional']:
return ''
raise ValueError, 'Missing input variable, <em>%s</em>' % name
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