Cleaned up a bunch of scripts.
This commit is contained in:
@ -20,7 +20,7 @@ No Atoms,energy@energy.com,Yes,Activated,Learner
|
||||
|
||||
"""
|
||||
|
||||
import pandas as pd
|
||||
# import pandas as pd
|
||||
import requests
|
||||
import Apikeys
|
||||
import pprint
|
||||
@ -53,11 +53,10 @@ def check_if_exists(emails):
|
||||
find_person_url = f"{BASEURL}/people?filter[email][eq]={encemail}"
|
||||
find_person_resp = requests.get(find_person_url, headers=HEADERS).json()
|
||||
person_uuid = find_person_resp["data"][0]["id"]
|
||||
except Exception as e:
|
||||
# print(f"Error! {e} with person {email}")
|
||||
if find_person_resp['data'] == []:
|
||||
PPL_LISTS['to_be_created'].extend([ email ])
|
||||
|
||||
except Exception as e:
|
||||
print(f"Error! {e} with person {email}")
|
||||
else:
|
||||
PPL_LISTS['to_be_created'].remove(email) if email in PPL_LISTS['to_be_created'] else None
|
||||
PPL_LISTS['to_be_registered'].extend([ person_uuid ])
|
||||
|
||||
Reference in New Issue
Block a user