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:
Chris Hill-Scott
2019-06-06 17:24:48 +01:00
parent f2303ff20a
commit 6130004b0c
3 changed files with 6 additions and 3 deletions

View File

@@ -348,10 +348,10 @@ class InvitedUser(JSONModel):
def accept_invite(self):
invite_api_client.accept_invite(self.service, self.id)
def add_to_service(self):
def add_to_service(self, existing_user_id):
user_api_client.add_user_to_service(
self.service,
self.id,
existing_user_id,
self.permissions,
self.folder_permissions,
)