diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2016-04-12 19:08:35 +0200 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2016-04-12 19:08:35 +0200 |
commit | 5fb572417e0c331afb62c8bbaa561b0fe7836fc5 (patch) | |
tree | e26e6a64d94a26b9a48aa0e998d93538f0fc0ba9 /lib/api/groups.rb | |
parent | d0cdc2ee73c8421906fbd011d0f44d638616a864 (diff) | |
download | gitlab-ce-5fb572417e0c331afb62c8bbaa561b0fe7836fc5.tar.gz |
Fix minor issues according development guidelines
Diffstat (limited to 'lib/api/groups.rb')
-rw-r--r-- | lib/api/groups.rb | 10 |
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 |