Work on a lot of things. Mainly cleaning up person and profile related fields in multiple tables.
This commit is contained in:
@@ -192,7 +192,7 @@ async def v2_post_event_person_new(
|
||||
else:
|
||||
new_password = secrets.token_urlsafe(default_num_bytes)
|
||||
|
||||
organization_name = event_person_new_init.organization_name
|
||||
affiliations = event_person_new_init.affiliations
|
||||
|
||||
# New person
|
||||
person_new = {}
|
||||
@@ -201,7 +201,7 @@ async def v2_post_event_person_new(
|
||||
person_new['family_name'] = family_name
|
||||
person_new['full_name'] = full_name
|
||||
person_new['display_name'] = display_name
|
||||
person_new['organization_name'] = organization_name
|
||||
person_new['affiliations'] = affiliations
|
||||
|
||||
# New person contact
|
||||
person_new['contact'] = {}
|
||||
|
||||
@@ -249,7 +249,7 @@ async def get_event_presenter_obj(
|
||||
# inc_event_presentation_list: bool = False, # NOTE: Placehold for future?
|
||||
# inc_event_presenter_list: bool = False, # NOTE: Placehold for future?
|
||||
inc_event_registration: bool = False, # Under event_person obj
|
||||
# inc_event_session: bool = False, # NOTE: Placehold for future?
|
||||
inc_event_session: bool = False, # NOTE: Placehold for future?
|
||||
# inc_event_session_list: bool = False, # NOTE: Placehold for future?
|
||||
inc_person: bool = False, # Under event_person obj
|
||||
inc_user: bool = False, # Under event_person obj
|
||||
@@ -279,7 +279,7 @@ async def get_event_presenter_obj(
|
||||
inc_event_person_profile = inc_event_person_profile,
|
||||
inc_event_presentation = inc_event_presentation,
|
||||
inc_event_registration = inc_event_registration,
|
||||
# inc_event_session = inc_event_session,
|
||||
inc_event_session = inc_event_session,
|
||||
inc_person = inc_person,
|
||||
inc_user = inc_user,
|
||||
):
|
||||
|
||||
@@ -166,8 +166,8 @@ async def importing_person_data_v2(
|
||||
person_data['family_name'] = record['family_name']
|
||||
else:
|
||||
person_data['family_name'] = None
|
||||
if name_prefix := record.get('name_prefix', None): person_data['prefix'] = name_prefix
|
||||
if name_suffix := record.get('name_suffix', None): person_data['suffix'] = name_suffix
|
||||
if name_prefix := record.get('name_prefix', None): person_data['title_names'] = name_prefix
|
||||
if name_suffix := record.get('name_suffix', None): person_data['designations'] = name_suffix
|
||||
if person_data['given_name'] and person_data['middle_name'] and person_data['family_name']:
|
||||
person_data['full_name'] = person_data['given_name']+' '+person_data['middle_name']+' '+person_data['family_name']
|
||||
elif person_data['given_name'] and person_data['family_name']:
|
||||
@@ -187,9 +187,15 @@ async def importing_person_data_v2(
|
||||
person_data['last_first_name'] = record.get('last_first_name', None)
|
||||
|
||||
if designation := record.get('designation', None):
|
||||
person_data['designation'] = designation # professional designation
|
||||
if person_data['designations']:
|
||||
person_data['designations'] = person_data['designations'] + ' ' + designation # professional designation
|
||||
else:
|
||||
person_data['designations'] = designation # professional designation
|
||||
elif designation := record.get('professional_designations', None):
|
||||
person_data['designation'] = designation
|
||||
if person_data['designations']:
|
||||
person_data['designations'] = person_data['designations'] + ' ' + designation # professional designation
|
||||
else:
|
||||
person_data['designations'] = designation # professional designation
|
||||
|
||||
if birth_date := record.get('date_of_birth', None):
|
||||
person_data['birth_date'] = birth_date
|
||||
@@ -775,8 +781,8 @@ async def importing_person_data(
|
||||
person_data['family_name'] = record['family_name']
|
||||
else:
|
||||
person_data['family_name'] = None
|
||||
# person_data['prefix'] = record['prefix']
|
||||
person_data['suffix'] = record['suffix']
|
||||
# person_data['designations'] = record['prefix']
|
||||
person_data['designations'] = record['suffix']
|
||||
if person_data['given_name'] and person_data['middle_name'] and person_data['family_name']:
|
||||
person_data['full_name'] = person_data['given_name']+' '+person_data['middle_name']+' '+person_data['family_name']
|
||||
elif person_data['given_name'] and person_data['family_name']:
|
||||
|
||||
Reference in New Issue
Block a user