Working on event person, registration, badge, session, presentation, and presenter create and update. _v3 things
This commit is contained in:
@@ -117,8 +117,13 @@ def get_contact_rec_list(
|
||||
|
||||
# ### BEGIN ### API Contact Methods ### create_contact_obj() ###
|
||||
# NOTE: This will create a contact and then also create a linked address if contact_obj.address data is passed.
|
||||
# Reviewed and updated 2021-08-10
|
||||
def create_contact_obj(contact_obj_new:Contact_Base):
|
||||
# NOTE: In the future it should be required that account_id, for_type, and for_id should be passed separately. account_id might not be required *if* it can be looked up based on for_type and for_id.
|
||||
# Reviewed and updated 2021-08-24
|
||||
def create_contact_obj(
|
||||
contact_obj_new: Contact_Base,
|
||||
create_sub_obj: bool = False,
|
||||
fail_any: bool = False, # Fail if any thing goes wrong for sub objects
|
||||
) -> int|bool:
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
@@ -167,6 +172,7 @@ def update_contact_obj(
|
||||
contact_id: int|str, # Ideally the int ID should be passed. This allows for updating of the id_random value.
|
||||
contact_obj_up: Contact_Base,
|
||||
create_missing_obj: bool = False,
|
||||
fail_any: bool = False, # Fail if any thing goes wrong for sub objects
|
||||
) -> bool:
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
@@ -189,9 +195,9 @@ def update_contact_obj(
|
||||
log.debug(address_id)
|
||||
log.debug(address_obj_up)
|
||||
if address_obj_up_result := update_address_obj(
|
||||
address_id=address_id,
|
||||
address_obj_up=address_obj_up,
|
||||
create_missing_obj=create_missing_obj,
|
||||
address_id = address_id,
|
||||
address_obj_up = address_obj_up,
|
||||
create_missing_obj = create_missing_obj,
|
||||
):
|
||||
log.debug(address_obj_up_result)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user