diff options
author | Stan Hu <stanhu@gmail.com> | 2018-10-18 01:43:49 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-10-18 01:43:49 -0700 |
commit | 3ea988e854b09a224e75011d6169d756e394456a (patch) | |
tree | 15439d3f5744030b65e48d48193f5d130f41d4c8 /app | |
parent | c5d8e7fcee6bb15376902e8f1336f1ed368b9da8 (diff) | |
download | gitlab-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')
-rw-r--r-- | app/services/groups/update_service.rb | 6 |
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) |