Change label to exclude the type of message being sent.

Fix send email to self, it was always using mobile number to send mesasge. This fixes that.
This commit is contained in:
Rebecca Law
2016-03-02 17:02:41 +00:00
parent f0e0006a7c
commit 789264a863
4 changed files with 47 additions and 5 deletions

View File

@@ -139,10 +139,17 @@ def send_message_to_self(service_id, template_id):
[first_column_heading[template.template_type]] +
list(template.placeholders)
)
writer.writerow(
[current_user.mobile_number] +
["test {}".format(header) for header in template.placeholders]
)
if template.template_type == 'sms':
writer.writerow(
[current_user.mobile_number] +
["test {}".format(header) for header in template.placeholders]
)
if template.template_type == 'email':
writer.writerow(
[current_user.email_address] +
["test {}".format(header) for header in template.placeholders]
)
filedata = {
'file_name': 'Test run',
'data': output.getvalue().splitlines()