diff options
author | Stan Hu <stanhu@gmail.com> | 2017-02-15 17:15:54 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-02-27 13:09:55 +0200 |
commit | 3129dd502bb930302c27d465590b9582bea824d2 (patch) | |
tree | c3777ce4a7af9b14ef2e0601046617c33af93e1f | |
parent | 8b855eaf40fcb32d37c4cd2c2dbe8ff8be29c88c (diff) | |
download | gitlab-ce-3129dd502bb930302c27d465590b9582bea824d2.tar.gz |
Make nested groups deletion synchronous to avoid potential race
-rw-r--r-- | app/services/groups/destroy_service.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/services/groups/destroy_service.rb b/app/services/groups/destroy_service.rb index 2e2d7f884ac..497fdb09cdc 100644 --- a/app/services/groups/destroy_service.rb +++ b/app/services/groups/destroy_service.rb @@ -18,7 +18,8 @@ module Groups end group.children.each do |group| - DestroyService.new(group, current_user).async_execute + # This needs to be synchronous since the namespace gets destroyed below + DestroyService.new(group, current_user).execute end group.really_destroy! |