mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Fix inviting existing users
The API needs the id of the user, not the id of the invite. The problem with the tests is that the update mock returned a different user ID than the user it was being passed. So the tests didn’t catch this.
This commit is contained in:
@@ -65,7 +65,7 @@ def accept_invite(token):
|
||||
invited_user.auth_type == 'email_auth'
|
||||
):
|
||||
existing_user.update(auth_type=invited_user.auth_type)
|
||||
invited_user.add_to_service()
|
||||
invited_user.add_to_service(existing_user_id=existing_user.id)
|
||||
return redirect(url_for('main.service_dashboard', service_id=service.id))
|
||||
else:
|
||||
return redirect(url_for('main.register_from_invite'))
|
||||
|
||||
Reference in New Issue
Block a user