General code clean up for easier debugging.
This commit is contained in:
@@ -949,7 +949,7 @@ def get_id_random(
|
|||||||
table_name: str,
|
table_name: str,
|
||||||
log_lvl: int = logging.WARNING, # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
log_lvl: int = logging.WARNING, # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||||
) -> str|bool|None:
|
) -> str|bool|None:
|
||||||
log.setLevel(lo_lvl)
|
log.setLevel(log_lvl)
|
||||||
|
|
||||||
data = { 'id': record_id }
|
data = { 'id': record_id }
|
||||||
sql = f"""
|
sql = f"""
|
||||||
|
|||||||
@@ -317,9 +317,9 @@ def create_contact_obj(
|
|||||||
address_id: int = None,
|
address_id: int = None,
|
||||||
create_sub_obj: bool = False,
|
create_sub_obj: bool = False,
|
||||||
fail_any: bool = False, # Fail if any thing goes wrong for sub objects
|
fail_any: bool = False, # Fail if any thing goes wrong for sub objects
|
||||||
|
log_lvl: int = logging.WARNING, # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||||
) -> int|bool:
|
) -> int|bool:
|
||||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
log.setLevel(log_lvl)
|
||||||
log.debug(locals())
|
|
||||||
|
|
||||||
# ### SECTION ### Secondary data validation
|
# ### SECTION ### Secondary data validation
|
||||||
# NOTE: Remove at future date. Is this check needed if we trust that the ID is checked ahead of time?
|
# NOTE: Remove at future date. Is this check needed if we trust that the ID is checked ahead of time?
|
||||||
@@ -443,9 +443,9 @@ def update_contact_obj(
|
|||||||
create_sub_obj: bool = False,
|
create_sub_obj: bool = False,
|
||||||
fail_any: bool = False, # Fail if any thing goes wrong for sub objects
|
fail_any: bool = False, # Fail if any thing goes wrong for sub objects
|
||||||
return_dict: bool = False,
|
return_dict: bool = False,
|
||||||
|
log_lvl: int = logging.WARNING, # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||||
) -> bool:
|
) -> bool:
|
||||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
log.setLevel(log_lvl)
|
||||||
log.debug(locals())
|
|
||||||
|
|
||||||
# ### SECTION ### Secondary data validation
|
# ### SECTION ### Secondary data validation
|
||||||
# NOTE: Remove at future date. Is this check needed if we trust that the ID is checked ahead of time?
|
# NOTE: Remove at future date. Is this check needed if we trust that the ID is checked ahead of time?
|
||||||
|
|||||||
@@ -466,9 +466,9 @@ def create_update_aether_person(
|
|||||||
cvent_contact_obj: dict,
|
cvent_contact_obj: dict,
|
||||||
account_id: str,
|
account_id: str,
|
||||||
person_id: str=None,
|
person_id: str=None,
|
||||||
|
log_lvl: int = logging.WARNING, # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||||
):
|
):
|
||||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
log.setLevel(log_lvl)
|
||||||
log.debug(locals())
|
|
||||||
|
|
||||||
# Important variables used more than once.
|
# Important variables used more than once.
|
||||||
person_external_id = None
|
person_external_id = None
|
||||||
|
|||||||
Reference in New Issue
Block a user