ORM : debug : error message on python constraints are now displayed correctly
authorbch <>
Wed, 17 Jan 2007 14:07:28 +0000 (14:07 +0000)
committerbch <>
Wed, 17 Jan 2007 14:07:28 +0000 (14:07 +0000)
bzr revid: bch-5788b57099e7d45fa3d7b5758d24d4d2cf17b2a7

bin/osv/osv.py

index bc845a5..3915ea6 100644 (file)
@@ -85,7 +85,8 @@ class osv_pool(netsvc.Service):
                                res = getattr(obj,method)(cr, uid, *args, **kw)
                        return res
                except orm.except_orm, inst:
-                       self.abortResponse(1, inst.value[0], inst.name, inst.value[1])
+                       #self.abortResponse(1, inst.value[0], inst.name, inst.value[1])
+                       self.abortResponse(1, inst.value[0], 'warning', inst.value[1])
                except except_osv, inst:
                        self.abortResponse(1, inst.name, inst.exc_type, inst.value)
                except psycopg.IntegrityError, inst: