[fix] problem with some server errors that have a fault_code which is an int

bzr revid: nicolas.vanhoren@openerp.com-20110912160326-c8ayrno6x6appzuv
This commit is contained in:
niv-openerp
2011-09-12 18:03:26 +02:00
parent e10fbbe555
commit 0dc2bcf218
+1 -1
View File
@@ -150,7 +150,7 @@ openerp.web.CrashManager = openerp.web.Dialog.extend(/** @lends openerp.web.Cras
on_rpc_error: function(error) {
this.error = error;
if (error.data.fault_code) {
var split = error.data.fault_code.split('\n')[0].split(' -- ');
var split = ("" + error.data.fault_code).split('\n')[0].split(' -- ');
if (split.length > 1) {
error.type = split.shift();
error.data.fault_code = error.data.fault_code.substr(error.type.length + 4);