Added postal code to badges and tracking data
This commit is contained in:
@@ -82,6 +82,8 @@ class Event_Badge_Base(BaseModel):
|
||||
state_province: Optional[str]
|
||||
state_province_abb: Optional[str]
|
||||
|
||||
postal_code: Optional[str]
|
||||
|
||||
country_alpha_2_code: Optional[str]
|
||||
country: Optional[str]
|
||||
|
||||
@@ -241,6 +243,8 @@ class Event_Badge_Basic_Base(BaseModel):
|
||||
state_province: Optional[str]
|
||||
state_province_abb: Optional[str]
|
||||
|
||||
postal_code: Optional[str]
|
||||
|
||||
country_alpha_2_code: Optional[str]
|
||||
country: Optional[str]
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ class Event_Exhibit_Tracking_Base(BaseModel):
|
||||
event_badge_country_subdivision_code: Optional[str]
|
||||
event_badge_state_province_abb: Optional[str]
|
||||
event_badge_state_province: Optional[str]
|
||||
event_badge_postal_code: Optional[str]
|
||||
event_badge_country_alpha_2_code: Optional[str]
|
||||
event_badge_country: Optional[str]
|
||||
|
||||
|
||||
@@ -94,6 +94,7 @@ async def event_import_reg(
|
||||
country_subdivision_code = None
|
||||
state_province = None
|
||||
state_province_abb = None
|
||||
postal_code = None
|
||||
country_alpha_2_code = None
|
||||
country = None
|
||||
if details:
|
||||
@@ -111,6 +112,8 @@ async def event_import_reg(
|
||||
state_province = address.get('state')
|
||||
state_province_abb = address.get('stateAbbreviation')
|
||||
|
||||
postal_code = address.get('zipcode')
|
||||
|
||||
if country_data := address.get('countryData'):
|
||||
country_alpha_3_code = country_data.get('threeLetterIsoCode')
|
||||
country_alpha_2_code = country_data.get('twoLetterIsoCode')
|
||||
@@ -331,6 +334,8 @@ async def event_import_reg(
|
||||
event_badge_data['state_province'] = state_province
|
||||
if state_province_abb:
|
||||
event_badge_data['state_province_abb'] = state_province_abb
|
||||
if postal_code:
|
||||
event_badge_data['postal_code'] = postal_code
|
||||
if country_alpha_2_code:
|
||||
event_badge_data['country_alpha_2_code'] = country_alpha_2_code
|
||||
if country:
|
||||
|
||||
@@ -279,10 +279,12 @@ async def get_event_exhibit_obj_tracking_list(
|
||||
data_dict['person_display_affiliations'] = data_dict.pop('event_badge_display_affiliations')
|
||||
|
||||
data_dict['person_email'] = data_dict.pop('event_badge_email')
|
||||
|
||||
data_dict['person_city'] = data_dict.pop('event_badge_city')
|
||||
data_dict['person_country_subdivision_code'] = data_dict.pop('event_badge_country_subdivision_code')
|
||||
data_dict['person_state_province_abb'] = data_dict.pop('event_badge_state_province_abb')
|
||||
data_dict['person_state_province'] = data_dict.pop('event_badge_state_province')
|
||||
data_dict['person_postal_code'] = data_dict.pop('event_badge_postal_code')
|
||||
data_dict['person_country_alpha_2_code'] = data_dict.pop('event_badge_country_alpha_2_code')
|
||||
data_dict['person_country'] = data_dict.pop('event_badge_country')
|
||||
|
||||
@@ -319,6 +321,7 @@ async def get_event_exhibit_obj_tracking_list(
|
||||
'person_city',
|
||||
'person_country_subdivision_code', 'person_state_province_abb',
|
||||
'person_state_province',
|
||||
'person_postal_code',
|
||||
'person_country_alpha_2_code',
|
||||
'person_country',
|
||||
|
||||
|
||||
Reference in New Issue
Block a user