Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2016-04-12 20:08:35 +0300
committerRobert Schilling <rschilling@student.tugraz.at>2016-04-12 20:08:35 +0300
commit5fb572417e0c331afb62c8bbaa561b0fe7836fc5 (patch)
treee26e6a64d94a26b9a48aa0e998d93538f0fc0ba9 /lib
parentd0cdc2ee73c8421906fbd011d0f44d638616a864 (diff)
Fix minor issues according development guidelines
Diffstat (limited to 'lib')
-rw-r--r--lib/api/groups.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb
index 964f691afcc..91e420832f3 100644
--- a/lib/api/groups.rb
+++ b/lib/api/groups.rb
@@ -47,7 +47,7 @@ module API
# Update group. Available only for users who can administrate groups.
#
# Parameters:
- # id (required) - The ID of a group
+ # id (required) - The ID of a group
# path (optional) - The path of the group
# description (optional) - The description of the group
# visibility_level (optional) - The visibility level of the group
@@ -59,12 +59,10 @@ module API
attrs = attributes_for_keys [:name, :path, :description, :visibility_level]
- ::Groups::UpdateService.new(group, current_user, attrs).execute
-
- if group.errors.any?
- render_validation_error!(group)
- else
+ if ::Groups::UpdateService.new(group, current_user, attrs).execute
present group, with: Entities::GroupDetail
+ else
+ render_validation_error!(group)
end
end