Browse Source

[FIX] allsend_ok must get set to False if there is an exception in specific send method

pull/169/head
Wolfgang Pichler 6 years ago
parent
commit
3899451807
  1. 1
      base_sms_client/models/sms_sms.py

1
base_sms_client/models/sms_sms.py

@ -116,6 +116,7 @@ class SmsSms(models.Model):
sms.write({'state': 'sent', 'error': ''})
except Exception as e:
_logger.error('Failed to send sms %s', e)
allsend_ok = False
sms.write({'error': e, 'state': 'error'})
sms._cr.commit()
return allsend_ok

Loading…
Cancel
Save