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
path: root/app
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-02-20 16:15:38 +0300
committerRémy Coutable <remy@rymai.me>2017-02-20 16:15:38 +0300
commit10f5f3f18f2317df0be454c90d2f9650d1e2d11a (patch)
tree8e1f44321f311a951e13313f9c8121ef4013bd9f /app
parentc89449e6110c2bdf6e1410bae3e7b7d807c5e305 (diff)
parent45f94ea78cf85a58e71e9a8ae62adc7e3f86bc99 (diff)
Merge branch 'sh-fix-project-team-truncation-in-destroy' into 'master'
Prevent project team from being truncated too early during project destruction See merge request !9361
Diffstat (limited to 'app')
-rw-r--r--app/services/projects/destroy_service.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/services/projects/destroy_service.rb b/app/services/projects/destroy_service.rb
index a08c6fcd94b..9716a1780a9 100644
--- a/app/services/projects/destroy_service.rb
+++ b/app/services/projects/destroy_service.rb
@@ -17,8 +17,6 @@ module Projects
def execute
return false unless can?(current_user, :remove_project, project)
- project.team.truncate
-
repo_path = project.path_with_namespace
wiki_path = repo_path + '.wiki'
@@ -30,6 +28,7 @@ module Projects
Projects::UnlinkForkService.new(project, current_user).execute
Project.transaction do
+ project.team.truncate
project.destroy!
unless remove_registry_tags