Skip to content

Commit

Permalink
Add empty to when create_empty_number is true
Browse files Browse the repository at this point in the history
  • Loading branch information
MariteSomEnergia committed Nov 30, 2021
1 parent 5f189f9 commit 7f971ad
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions powersms/wizard/wizard_send_sms.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,11 @@ def get_end_value(id, value):
'psms_account_id': screen_vals['account'],
'state':'na',
}
for number in vals['psms_to']:
if not number and not create_empty_number:
continue

if len(vals['psms_to']) == 0 and create_empty_number:
vals['psms_to'] = ['']

for number in vals['psms_to']:
vals.update({'psms_to': number})
#Create partly the mail and later update attachments
ctx = context.copy()
Expand Down

0 comments on commit 7f971ad

Please sign in to comment.