fix(chalice): fixed reset&update password at the same time (#1790)

This commit is contained in:
Kraiem Taha Yassine 2023-12-19 18:06:57 +01:00 committed by GitHub
parent b5375df6e1
commit 1fb852590c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -127,6 +127,8 @@ def update(tenant_id, user_id, changes, output=True):
sub_query_bauth.append("changed_at = timezone('utc'::text, now())")
sub_query_bauth.append("change_pwd_expire_at = NULL")
sub_query_bauth.append("change_pwd_token = NULL")
sub_query_bauth.append("invitation_token = NULL")
sub_query_bauth.append("invited_at = NULL")
else:
sub_query_bauth.append(f"{helper.key_to_snake_case(key)} = %({key})s")
else:

View file

@ -152,6 +152,8 @@ def update(tenant_id, user_id, changes, output=True):
sub_query_bauth.append("changed_at = timezone('utc'::text, now())")
sub_query_bauth.append("change_pwd_expire_at = NULL")
sub_query_bauth.append("change_pwd_token = NULL")
sub_query_bauth.append("invitation_token = NULL")
sub_query_bauth.append("invited_at = NULL")
else:
sub_query_bauth.append(f"{helper.key_to_snake_case(key)} = %({key})s")
else: