bugfix: original constraint message is showed when there is no translations

bzr revid: christophe@tinyerp.com-20080723113021-7jgz9j99imrcokxh
This commit is contained in:
Christophe Simonis 2008-07-23 13:30:21 +02:00
parent 692c4d97b3
commit 96ed63b84a
1 changed files with 1 additions and 1 deletions

View File

@ -635,7 +635,7 @@ class orm_template(object):
fun, msg, fields = constraint
if not fun(self, cr, uid, ids):
field_error += fields
field_err_str.append( trans._get_source(cr, uid, self._name, 'constraint', lng, source=msg) )
field_err_str.append( trans._get_source(cr, uid, self._name, 'constraint', lng, source=msg) or msg )
if len(field_err_str):
cr.rollback()
raise except_orm('ValidateError', ('\n'.join(field_err_str), ','.join(field_error)))