Updates for Cvent, IDAA, and general clean up
This commit is contained in:
@@ -473,12 +473,18 @@ def create_update_aether_person(
|
|||||||
|
|
||||||
# Important variables used more than once.
|
# Important variables used more than once.
|
||||||
person_external_id = None
|
person_external_id = None
|
||||||
|
status = None
|
||||||
if custom_field_list := cvent_contact_obj.get('customFields'): # List
|
if custom_field_list := cvent_contact_obj.get('customFields'): # List
|
||||||
for custom_field in custom_field_list:
|
for custom_field in custom_field_list:
|
||||||
# Get the External ID created by OSIT
|
# Get the External ID created by OSIT
|
||||||
if custom_field.get('id') == '609ab766-7d79-4a9d-a72c-f126412659ee':
|
if custom_field.get('id') == '609ab766-7d79-4a9d-a72c-f126412659ee':
|
||||||
# person_data['external_id'] = custom_field.get('value')[0]
|
# person_data['external_id'] = custom_field.get('value')[0]
|
||||||
person_external_id = custom_field.get('value')[0]
|
person_external_id = custom_field.get('value')[0]
|
||||||
|
|
||||||
|
# Get the (Contact) Status created by OSIT
|
||||||
|
if custom_field.get('id') == 'e4e51781-e1ec-4f61-8329-b5d29bec6886':
|
||||||
|
# person_data['external_id'] = custom_field.get('value')[0]
|
||||||
|
status = custom_field.get('value')[0].lower()
|
||||||
email = cvent_contact_obj.get('email')
|
email = cvent_contact_obj.get('email')
|
||||||
membership_person_id = None
|
membership_person_id = None
|
||||||
membership_person_type_id = None
|
membership_person_type_id = None
|
||||||
@@ -495,6 +501,7 @@ def create_update_aether_person(
|
|||||||
person_data['designations'] = cvent_contact_obj.get('designation')
|
person_data['designations'] = cvent_contact_obj.get('designation')
|
||||||
person_data['professional_title'] = cvent_contact_obj.get('title')
|
person_data['professional_title'] = cvent_contact_obj.get('title')
|
||||||
person_data['affiliations'] = cvent_contact_obj.get('company')
|
person_data['affiliations'] = cvent_contact_obj.get('company')
|
||||||
|
person_data['status'] = status
|
||||||
person_data['enable'] = True
|
person_data['enable'] = True
|
||||||
log.debug(person_data)
|
log.debug(person_data)
|
||||||
|
|
||||||
|
|||||||
@@ -99,6 +99,10 @@ class Person_Base(BaseModel):
|
|||||||
allow_auth_key: Optional[bool]
|
allow_auth_key: Optional[bool]
|
||||||
auth_key: Optional[str]
|
auth_key: Optional[str]
|
||||||
|
|
||||||
|
status: Optional[str]
|
||||||
|
# status_id: Optional[int] # From a lookup
|
||||||
|
# status_name: Optional[str] # Status name from the lookup
|
||||||
|
|
||||||
enable: Optional[bool]
|
enable: Optional[bool]
|
||||||
|
|
||||||
group: Optional[str]
|
group: Optional[str]
|
||||||
|
|||||||
Reference in New Issue
Block a user