summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorBenjamin Vray <bvr@odoo.com>2019-09-19 12:43:30 +0000
committerBenjamin Vray <bvr@odoo.com>2019-10-01 11:45:27 +0000
commit6eaf5da98acb7ac9d28caafdaa09804ed8e25ff7 (patch)
tree19e3ff846f03dfb67327f5b6c0b77a6b83c9d418 /addons
parent2a7796cbaf966d0b0c85831389727ab9678c1ed7 (diff)
[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>
Diffstat (limited to 'addons')
-rw-r--r--addons/sms/static/src/js/message.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/sms/static/src/js/message.js b/addons/sms/static/src/js/message.js
index b5463ae9f8f..27ab85b0d21 100644
--- a/addons/sms/static/src/js/message.js
+++ b/addons/sms/static/src/js/message.js
@@ -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;
+ }
},
//--------------------------------------------------------------------------