Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't return any error from already open team #9888

Merged
merged 2 commits into from Dec 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions go/teams/service_helper.go
Expand Up @@ -1056,13 +1056,14 @@ func ChangeTeamSettings(ctx context.Context, g *libkb.GlobalContext, teamName st
}

if !settings.Open && !t.IsOpen() {
return libkb.NoOpError{Desc: "Team is already closed."}
g.Log.CDebugf(ctx, "team is already closed, just returning: %s", teamName)
return nil
}

if settings.Open && t.IsOpen() && t.OpenTeamJoinAs() == settings.JoinAs {
return libkb.NoOpError{
Desc: fmt.Sprintf("Team is already open with default role: %s.", strings.ToLower(t.OpenTeamJoinAs().String())),
}
g.Log.CDebugf(ctx, "team is already open with default role: team: %s role: %s",
teamName, strings.ToLower(t.OpenTeamJoinAs().String()))
return nil
}

return t.PostTeamSettings(ctx, settings)
Expand Down