Fix a bug with inviting existing users to an organisation.

The method to add the user to the organisation was missing the user id. This PR fixes that.
This commit is contained in:
Rebecca Law
2019-06-27 15:34:23 +01:00
parent 149003c52c
commit d344bc7006
3 changed files with 6 additions and 6 deletions

View File

@@ -105,7 +105,7 @@ def accept_org_invite(token):
if existing_user:
invited_org_user.accept_invite()
if existing_user not in organisation_users:
invited_org_user.add_to_organisation()
invited_org_user.add_to_organisation(existing_user.id)
return redirect(url_for('main.organisation_dashboard', org_id=invited_org_user.organisation))
else:
return redirect(url_for('main.register_from_org_invite'))