Don't 'use my own number' if user doesn't have one

This commit is contained in:
chrisw
2017-11-09 16:09:00 +00:00
parent 1effec78e5
commit 0fac7125d2
2 changed files with 19 additions and 2 deletions

View File

@@ -410,7 +410,8 @@ def send_test_step(service_id, template_id, step_index):
if (
request.endpoint == 'main.send_one_off_step' and
step_index == 0 and
template.template_type != 'letter'
template.template_type != 'letter' and
not (template.template_type == 'sms' and current_user.mobile_number is None)
):
skip_link = (
'Use my {}'.format(first_column_headings[template.template_type][0]),