[FIX] sms: avoid error when resending sms

avoid a traceback when resending a SMS
It was because arguments of the js function setSmsStatus
were undefined in this case

closes odoo/odoo#36907

Task-id: 2070836
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
This commit is contained in:
Benjamin Vray
2019-10-01 11:45:27 +00:00
parent 2a7796cbaf
commit 6eaf5da98a
+3 -1
View File
@@ -59,7 +59,9 @@ Message.include({
var sms = _.find(self._smsIds, function (sms) {
return sms[0] === smsID;
});
sms[2] = smsStatus;
if (sms !== undefined && smsStatus !== undefined) {
sms[2] = smsStatus;
}
},
//--------------------------------------------------------------------------