[FIX] postgres 9.2 added data at the end of 23502's error message, only use prefix matches not fullstring
bzr revid: xmo@openerp.com-20120927095038-m2vm663nqj1s1pne
This commit is contained in:
parent
9a721eba32
commit
9d175bdfd6
|
@ -5376,7 +5376,7 @@ class ImportWarning(Warning):
|
|||
|
||||
def convert_pgerror_23502(model, fields, info, e):
|
||||
m = re.match(r'^null value in column "(?P<field>\w+)" violates '
|
||||
r'not-null constraint\n$',
|
||||
r'not-null constraint\n',
|
||||
str(e))
|
||||
if not m or m.group('field') not in fields:
|
||||
return {'message': unicode(e)}
|
||||
|
|
Loading…
Reference in New Issue