Clean up and debugging.

This commit is contained in:
Scott Idem
2023-01-30 17:29:01 -05:00
parent bbf23e9f0b
commit b510a44adf
3 changed files with 11 additions and 9 deletions

View File

@@ -21,12 +21,13 @@ def load_account_cfg_obj(
inc_fundraising_cfg: bool = False,
inc_membership_cfg: bool = False,
) -> Account_Cfg_Base|dict|bool:
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.debug(locals())
if account_id := redis_lookup_id_random(record_id_random=account_id, table_name='account'): pass
else: return False
log.info('Getting Account CFG ID: ${account_id}')
if account_cfg_rec := sql_select(
table_name = 'v_account_cfg', # This view should probably be cleaned up
field_name = 'account_id',
@@ -34,11 +35,12 @@ def load_account_cfg_obj(
): pass
else: return False
log.debug(account_cfg_rec)
try:
account_cfg_obj = Account_Cfg_Base(**account_cfg_rec)
log.debug(account_cfg_obj)
except ValidationError as e:
log.error(e.json())
log.debug(account_cfg_obj)
if inc_fundraising_cfg:
if fundraising_cfg_dict := load_fundraising_cfg_obj_old(