Commit 157cf17c authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[web/form] Relax condition for non-translating field names

we should test true condition instead of None, so if one raise a ValidationError
using an empty string as 'no-field' marker instead of None, we don't get the PO
file header that gettext likes to return when one attempt to translate an empty
string.

--HG--
branch : 3.25
parent 1c912b7d9503
...@@ -172,7 +172,7 @@ class FormRenderer(AppObject): ...@@ -172,7 +172,7 @@ class FormRenderer(AppObject):
else: else:
templstr = u' %s\n' templstr = u' %s\n'
for field, err in errors: for field, err in errors:
if field is None: if not field:
errormsg += templstr % err errormsg += templstr % err
else: else:
errormsg += templstr % '%s: %s' % (req._(field), err) errormsg += templstr % '%s: %s' % (req._(field), 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