feat(invite): fixes for org invite enhancement story, #2353

This commit is contained in:
Torkel Ödegaard
2015-08-17 10:55:52 +02:00
parent f7ea420a3f
commit 4a6b5274bc
7 changed files with 35 additions and 37 deletions

View File

@@ -181,7 +181,9 @@ func CompleteInvite(c *middleware.Context, completeInvite dtos.CompleteInviteFor
// add to org
addOrgUserCmd := m.AddOrgUserCommand{OrgId: invite.OrgId, UserId: user.Id, Role: invite.Role}
if err := bus.Dispatch(&addOrgUserCmd); err != nil {
return ApiError(500, "Error while trying to create org user", err)
if err != m.ErrOrgUserAlreadyAdded {
return ApiError(500, "Error while trying to create org user", err)
}
}
// set org to active