Browse Source

Merge pull request #169 from Callino/10.0

[FIX] allsend_ok must get set to False if there is an exception in specific send method
pull/149/merge
Alexis de Lattre 5 years ago
committed by GitHub
parent
commit
d8be9f17f3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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