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
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-10-18 11:43:49 +0300
committerStan Hu <stanhu@gmail.com>2018-10-18 11:43:49 +0300
commit3ea988e854b09a224e75011d6169d756e394456a (patch)
tree15439d3f5744030b65e48d48193f5d130f41d4c8 /app/services/groups
parentc5d8e7fcee6bb15376902e8f1336f1ed368b9da8 (diff)
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/groups')
-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)