Work on a lot of things. Mainly cleaning up person and profile related fields in multiple tables.
This commit is contained in:
@@ -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