Added address lines to the database for badges. Improved
This commit is contained in:
@@ -81,8 +81,9 @@ class Event_Badge_Base(BaseModel):
|
|||||||
address_line_3: Optional[str]
|
address_line_3: Optional[str]
|
||||||
|
|
||||||
city: Optional[str]
|
city: Optional[str]
|
||||||
|
|
||||||
county: Optional[str] # NOTE: This is for a county within a state or province
|
county: Optional[str] # NOTE: This is for a county within a state or province
|
||||||
|
|
||||||
country_subdivision_code: Optional[str]
|
country_subdivision_code: Optional[str]
|
||||||
state_province: Optional[str]
|
state_province: Optional[str]
|
||||||
state_province_abb: Optional[str]
|
state_province_abb: Optional[str]
|
||||||
@@ -242,8 +243,14 @@ class Event_Badge_Basic_Base(BaseModel):
|
|||||||
|
|
||||||
email: Optional[str]
|
email: Optional[str]
|
||||||
|
|
||||||
|
address_line_1: Optional[str]
|
||||||
|
address_line_2: Optional[str]
|
||||||
|
address_line_3: Optional[str]
|
||||||
|
|
||||||
city: Optional[str]
|
city: Optional[str]
|
||||||
|
|
||||||
county: Optional[str] # NOTE: This is for a county within a state or province
|
county: Optional[str] # NOTE: This is for a county within a state or province
|
||||||
|
|
||||||
country_subdivision_code: Optional[str]
|
country_subdivision_code: Optional[str]
|
||||||
state_province: Optional[str]
|
state_province: Optional[str]
|
||||||
state_province_abb: Optional[str]
|
state_province_abb: Optional[str]
|
||||||
|
|||||||
@@ -107,7 +107,12 @@ async def event_import_reg(
|
|||||||
if isinstance(addresses, list) and len(addresses):
|
if isinstance(addresses, list) and len(addresses):
|
||||||
for address in addresses:
|
for address in addresses:
|
||||||
if primary_address := address.get('primary'):
|
if primary_address := address.get('primary'):
|
||||||
|
address_line_1 = address.get('line1')
|
||||||
|
address_line_2 = address.get('line2')
|
||||||
|
address_line_3 = address.get('line3')
|
||||||
|
|
||||||
city = address.get('city')
|
city = address.get('city')
|
||||||
|
|
||||||
country_subdivision_code = address.get('stateISOCode')
|
country_subdivision_code = address.get('stateISOCode')
|
||||||
state_province = address.get('state')
|
state_province = address.get('state')
|
||||||
state_province_abb = address.get('stateAbbreviation')
|
state_province_abb = address.get('stateAbbreviation')
|
||||||
@@ -323,9 +328,10 @@ async def event_import_reg(
|
|||||||
|
|
||||||
if email: event_badge_data['email'] = email
|
if email: event_badge_data['email'] = email
|
||||||
|
|
||||||
event_badge_data['address_line_1'] = event_registrant.get('line1')
|
if address_line_1: event_badge_data['address_line_1'] = address_line_1
|
||||||
event_badge_data['address_line_2'] = event_registrant.get('line2')
|
if address_line_2: event_badge_data['address_line_2'] = address_line_2
|
||||||
event_badge_data['address_line_3'] = event_registrant.get('line3')
|
if address_line_3: event_badge_data['address_line_3'] = address_line_3
|
||||||
|
|
||||||
event_badge_data['city'] = event_registrant.get('badgeCity')
|
event_badge_data['city'] = event_registrant.get('badgeCity')
|
||||||
event_badge_data['state_province'] = event_registrant.get('badgeState')
|
event_badge_data['state_province'] = event_registrant.get('badgeState')
|
||||||
|
|
||||||
|
|||||||
@@ -280,11 +280,18 @@ async def get_event_exhibit_obj_tracking_list(
|
|||||||
|
|
||||||
data_dict['person_email'] = data_dict.pop('event_badge_email')
|
data_dict['person_email'] = data_dict.pop('event_badge_email')
|
||||||
|
|
||||||
|
data_dict['person_address_line_1'] = data_dict.pop('event_badge_address_line_1')
|
||||||
|
data_dict['person_address_line_2'] = data_dict.pop('event_badge_address_line_2')
|
||||||
|
data_dict['person_address_line_3'] = data_dict.pop('event_badge_address_line_3')
|
||||||
|
|
||||||
data_dict['person_city'] = data_dict.pop('event_badge_city')
|
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_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_abb'] = data_dict.pop('event_badge_state_province_abb')
|
||||||
data_dict['person_state_province'] = data_dict.pop('event_badge_state_province')
|
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_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_alpha_2_code'] = data_dict.pop('event_badge_country_alpha_2_code')
|
||||||
data_dict['person_country'] = data_dict.pop('event_badge_country')
|
data_dict['person_country'] = data_dict.pop('event_badge_country')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user