Don’t update email_access_validated_at on password reset

As of https://github.com/alphagov/notifications-admin/pull/4000/files
the admin app is doing this, so we don’t need to do it here as well.
This commit is contained in:
Chris Hill-Scott
2021-08-17 16:59:51 +01:00
parent 43f010ea1b
commit 2c7e4657ce
4 changed files with 6 additions and 27 deletions

View File

@@ -533,11 +533,10 @@ def update_password(user_id):
user = get_user_by_id(user_id=user_id)
req_json = request.get_json()
password = req_json.get('_password')
validated_email_access = req_json.pop('validated_email_access', False)
update_dct, errors = user_update_password_schema_load_json.load(req_json)
if errors:
raise InvalidRequest(errors, status_code=400)
update_user_password(user, password, validated_email_access=validated_email_access)
update_user_password(user, password)
return jsonify(data=user.serialize()), 200