File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
src/server/api/API_ingest Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 66
77from config import engine
88from models import SalesForceContacts
9+ from utils import standardize_phone_number
910
1011from api import pem
1112
@@ -56,8 +57,8 @@ def store_contacts_all():
5657 mailing_city = row ['MailingCity' ],
5758 mailing_state_province = row ['MailingState' ],
5859 mailing_zip_postal_code = row ['MailingPostalCode' ],
59- phone = row ['Phone' ],
60- mobile = row ['MobilePhone' ],
60+ phone = standardize_phone_number ( row ['Phone' ] or "" ) ,
61+ mobile = standardize_phone_number ( row ['MobilePhone' ] or "" ) ,
6162 email = row ['Email' ])
6263 session .add (contact )
6364 # if in test mode only return first page of results
Original file line number Diff line number Diff line change 77from config import engine
88from models import ShelterluvPeople
99
10+ from utils import standardize_phone_number
11+
1012logger = structlog .get_logger ()
1113
1214try :
@@ -89,7 +91,7 @@ def store_shelterluv_people_all():
8991 state = person ["State" ],
9092 zip = person ["Zip" ],
9193 email = person ["Email" ],
92- phone = person ["Phone" ],
94+ phone = standardize_phone_number ( person ["Phone" ] or "" ) ,
9395 animal_ids = person ["Animal_ids" ]))
9496 offset += LIMIT
9597 retries = 0
You can’t perform that action at this time.
0 commit comments