mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
add debug
This commit is contained in:
@@ -102,6 +102,7 @@ def extract_phones(job):
|
|||||||
first_row = job[0]
|
first_row = job[0]
|
||||||
job.pop(0)
|
job.pop(0)
|
||||||
first_row = first_row.split(",")
|
first_row = first_row.split(",")
|
||||||
|
current_app.logger.info(f"HEADERS {first_row}")
|
||||||
phone_index = 0
|
phone_index = 0
|
||||||
for item in first_row:
|
for item in first_row:
|
||||||
if item.lower() == "phone number":
|
if item.lower() == "phone number":
|
||||||
@@ -111,11 +112,14 @@ def extract_phones(job):
|
|||||||
job_row = 0
|
job_row = 0
|
||||||
for row in job:
|
for row in job:
|
||||||
row = row.split(",")
|
row = row.split(",")
|
||||||
|
# TODO WHY ARE WE CALCULATING PHONE INDEX IN THE LOOP?
|
||||||
phone_index = 0
|
phone_index = 0
|
||||||
for item in first_row:
|
for item in first_row:
|
||||||
if item.lower() == "phone number":
|
if item.lower() == "phone number":
|
||||||
break
|
break
|
||||||
phone_index = phone_index + 1
|
phone_index = phone_index + 1
|
||||||
|
current_app.logger.info(f"PHONE INDEX IS NOW {phone_index}")
|
||||||
|
current_app.logger.info(f"LENGTH OF ROW IS {len(row)}")
|
||||||
my_phone = row[phone_index]
|
my_phone = row[phone_index]
|
||||||
my_phone = re.sub(r"[\+\s\(\)\-\.]*", "", my_phone)
|
my_phone = re.sub(r"[\+\s\(\)\-\.]*", "", my_phone)
|
||||||
phones[job_row] = my_phone
|
phones[job_row] = my_phone
|
||||||
|
|||||||
Reference in New Issue
Block a user