mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 07:21:13 -05:00
merge from main and fix some tests
This commit is contained in:
@@ -114,16 +114,21 @@ def get_phone_number_from_s3(service_id, job_id, job_row_number):
|
||||
first_row = first_row.split(",")
|
||||
phone_index = 0
|
||||
for item in first_row:
|
||||
if item == "phone number":
|
||||
if item.lower() == "phone number":
|
||||
break
|
||||
phone_index = phone_index + 1
|
||||
|
||||
correct_row = job[job_row_number]
|
||||
correct_row = correct_row.split(",")
|
||||
|
||||
# This could happen if an old job cannot be retrieved from s3
|
||||
if len(correct_row) <= phone_index:
|
||||
return "Unknown Phone"
|
||||
my_phone = correct_row[phone_index]
|
||||
my_phone = re.sub(r"[\+\s\(\)\-\.]*", "", my_phone)
|
||||
return my_phone
|
||||
|
||||
|
||||
def get_personalisation_from_s3(service_id, job_id, job_row_number):
|
||||
job = JOBS.get(job_id)
|
||||
if job is None:
|
||||
|
||||
Reference in New Issue
Block a user