From 3310d9fc8b30763542060c2b1876fe616e4d516b Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Sun, 8 Aug 2021 11:54:57 -0400 Subject: [PATCH] Change to person.contact_id and related bug fixes. --- app/methods/person_methods.py | 2 +- app/models/cont_edu_cert_person_models.py | 2 +- app/models/person_models.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/methods/person_methods.py b/app/methods/person_methods.py index 34db9b2..2fe694e 100644 --- a/app/methods/person_methods.py +++ b/app/methods/person_methods.py @@ -323,7 +323,7 @@ def create_person_obj(person_obj_new:Person_Base): # Need to update the person with the new contact_id person_obj_up = {} person_obj_up['id'] = person_id - person_obj_up['contact_id'] = contact_id + person_obj_up['contact_id_old'] = contact_id if person_obj_up_result := sql_update(data=person_obj_up, table_name='person'): pass else: return False diff --git a/app/models/cont_edu_cert_person_models.py b/app/models/cont_edu_cert_person_models.py index df65d35..bc6a852 100644 --- a/app/models/cont_edu_cert_person_models.py +++ b/app/models/cont_edu_cert_person_models.py @@ -49,7 +49,7 @@ class Cont_Edu_Cert_Person_Base(BaseModel): full_name: Optional[str] informal_full_name: Optional[str] last_first_name: Optional[str] - display_name: Optional[str] + display_name: Optional[str] # Custom whatever they want for public display title: Optional[str] diff --git a/app/models/person_models.py b/app/models/person_models.py index 212f1d7..7781917 100644 --- a/app/models/person_models.py +++ b/app/models/person_models.py @@ -49,10 +49,10 @@ class Person_Base(BaseModel): prefix: Optional[str] suffix: Optional[str] - full_name: Optional[str] - informal_full_name: Optional[str] - last_first_name: Optional[str] - display_name: Optional[str] + full_name: Optional[str] # May be auto created from informal, given, family, etc if not given + informal_full_name: Optional[str] # Auto created + last_first_name: Optional[str] # Auto created + display_name: Optional[str] # Custom whatever they want for public display title: Optional[str]