diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-04-03 14:15:12 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-04-03 14:15:12 +0000 |
commit | ff3703f5e6e386d28790c3b395341bcf15b04c13 (patch) | |
tree | 8d8c29179ac25b472d751e237b6bb86ba05b67cc /app/services | |
parent | dcbd090cba92872e55528ecf7f7adffd3ffe70f7 (diff) | |
parent | 6a2d022d1d578f8957736de2fb895069c24c072b (diff) | |
download | gitlab-ce-ff3703f5e6e386d28790c3b395341bcf15b04c13.tar.gz |
Merge branch 'sh-fix-destroy-user-race' into 'master'
Fix race condition where a namespace would be deleted before a project was deleted
Closes #30334 and #30306
See merge request !10389
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/users/destroy_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/users/destroy_service.rb b/app/services/users/destroy_service.rb index 833da5bc5d1..a3b32a71a64 100644 --- a/app/services/users/destroy_service.rb +++ b/app/services/users/destroy_service.rb @@ -20,10 +20,10 @@ module Users Groups::DestroyService.new(group, current_user).execute end - user.personal_projects.each do |project| + user.personal_projects.with_deleted.each do |project| # Skip repository removal because we remove directory with namespace # that contain all this repositories - ::Projects::DestroyService.new(project, current_user, skip_repo: true).async_execute + ::Projects::DestroyService.new(project, current_user, skip_repo: true).execute end move_issues_to_ghost_user(user) |