diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-03-06 14:06:33 +0100 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-03-06 14:58:53 +0100 |
commit | 597639c09662b5f43ff966938c5e55e485a1563c (patch) | |
tree | f15d938c29a782c1cd99a10555e32c9bc617e74a /app/services/groups | |
parent | 449ecd6c68150a7d6d97c3070ffbc3f8b1e372dd (diff) | |
download | gitlab-ce-597639c09662b5f43ff966938c5e55e485a1563c.tar.gz |
Fix eslint
Diffstat (limited to 'app/services/groups')
-rw-r--r-- | app/services/groups/create_service.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/services/groups/create_service.rb b/app/services/groups/create_service.rb index 6ef78c3e677..c4e9b8fd8e0 100644 --- a/app/services/groups/create_service.rb +++ b/app/services/groups/create_service.rb @@ -23,13 +23,10 @@ module Groups @group.name ||= @group.path.dup if create_chat_team? - begin - response = Mattermost::CreateTeamService.new(@group, current_user).execute - - @group.build_chat_team(name: response['name'], team_id: response['id']) - end - + response = Mattermost::CreateTeamService.new(@group, current_user).execute return @group if @group.errors.any? + + @group.build_chat_team(name: response['name'], team_id: response['id']) end @group.save |