summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-10-18 01:43:49 -0700
committerStan Hu <stanhu@gmail.com>2018-10-18 01:43:49 -0700
commit3ea988e854b09a224e75011d6169d756e394456a (patch)
tree15439d3f5744030b65e48d48193f5d130f41d4c8 /app/services
parentc5d8e7fcee6bb15376902e8f1336f1ed368b9da8 (diff)
downloadgitlab-ce-3ea988e854b09a224e75011d6169d756e394456a.tar.gz
Fix Groups::UpdateService#execute not returning correct error code
This was causing problems in EE, where audit events were being generated even if the project failed to save.
Diffstat (limited to 'app/services')
-rw-r--r--app/services/groups/update_service.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/services/groups/update_service.rb b/app/services/groups/update_service.rb
index fe47aa2f140..0bf0e967dcc 100644
--- a/app/services/groups/update_service.rb
+++ b/app/services/groups/update_service.rb
@@ -14,9 +14,11 @@ module Groups
group.assign_attributes(params)
begin
- after_update if group.save
+ success = group.save
- true
+ after_update if success
+
+ success
rescue Gitlab::UpdatePathError => e
group.errors.add(:base, e.message)