User related clean up

This commit is contained in:
Scott Idem
2021-06-11 15:31:18 -04:00
parent d1f3a4c27e
commit 585692bb1d
3 changed files with 60 additions and 108 deletions

View File

@@ -75,7 +75,7 @@ def load_user_obj(
inc_contact: bool = False,
inc_organization: bool = False,
inc_person: bool = False,
inc_user_role_li: bool = False,
inc_user_role_list: bool = False,
) -> User_Out_Base|bool:
#log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.debug(locals())
@@ -130,7 +130,7 @@ def load_user_obj(
# user_obj.person = None
# NOTE: Including user roles should probably be reviewed
if inc_user_role_li:
if inc_user_role_list:
if role_rec_li := sql_select(table_name='v_user_role_detail', field_name='user_id', field_value=user_id, as_list=True):
user_rec['role_list'] = role_rec_li
#log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL