Work on user password updates

This commit is contained in:
Scott Idem
2023-01-30 16:28:15 -05:00
parent cdab2de5a6
commit 01ba5d8d72
3 changed files with 3 additions and 2 deletions

View File

@@ -737,7 +737,7 @@ def create_update_aether_person(
person_data['external_id'] = person_external_id
log.debug(person_data)
if update_person_kiss(person_id=person_id, person_dict_obj=person_data):
if update_person_kiss(person_id=person_id, person_dict_obj=person_data, set_default_password=False):
log.info(f'Updated Person ID: {person_id}')
else:
log.info(f'Did not update Person ID: {person_id}')

View File

@@ -148,6 +148,7 @@ def update_person_kiss(
contact_id: int|None = None,
organization_id: int|None = None,
user_id: int|None = None,
set_default_password: bool = True,
log_lvl: int = logging.DEBUG, # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
) -> bool:
log.setLevel(log_lvl)
@@ -235,6 +236,7 @@ def update_person_kiss(
user_id = user_id,
user_dict_obj = person_obj.user,
person_id = person_id,
set_default_password = False,
): pass # NOTE: There is a trigger that will update the person record with the new user ID.
else: return False
elif person_obj.user:

View File

@@ -82,7 +82,6 @@ def create_user_obj(
else:
log.warning('A new password was not passed and not setting a default password.')
log.debug(user_obj.new_password)
# user_dict['password'] = user_obj.password # There has to be a better way to do this??? It thinks "password" is unset and so is excluded?