Code clean up. Simplifying person, user, contact, and address methods
This commit is contained in:
@@ -138,10 +138,10 @@ def update_organization_obj(
|
||||
log.debug(contact_id)
|
||||
log.debug(contact_obj_up)
|
||||
if contact_obj_up_result := update_contact_obj(
|
||||
contact_id=contact_id,
|
||||
contact_obj_up=contact_obj_up,
|
||||
create_sub_obj=create_sub_obj,
|
||||
):
|
||||
contact_id = contact_id,
|
||||
contact_dict_obj = contact_obj_up,
|
||||
create_sub_obj = create_sub_obj,
|
||||
):
|
||||
log.debug(contact_obj_up_result)
|
||||
else:
|
||||
log.debug(contact_obj_up_result)
|
||||
@@ -150,7 +150,10 @@ def update_organization_obj(
|
||||
# NOTE: This will blindly create a new contact even if there was one associated but the organization.contact_id was not found.
|
||||
contact_obj_in = organization_obj_up.contact
|
||||
log.debug(contact_obj_in)
|
||||
if contact_obj_in_result := create_contact_obj(contact_obj_new=contact_obj_in):
|
||||
if contact_obj_in_result := create_contact_obj(
|
||||
account_id = contact_obj_in.account_id,
|
||||
contact_dict_obj=contact_obj_in,
|
||||
):
|
||||
# log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(contact_obj_in_result)
|
||||
organization_obj_up.contact_id = contact_obj_in_result
|
||||
|
||||
Reference in New Issue
Block a user