diff options
author | Toon Claes <toon@gitlab.com> | 2017-05-03 16:48:20 +0200 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2017-05-10 15:01:27 +0200 |
commit | 4f446dd45a4068a77f606c02c95389c5cf6a6647 (patch) | |
tree | 244cfebf02564121d393a6a9b441c46f9e6e0bda /db | |
parent | 1af540122563c372c03668f36e6a2123bff94222 (diff) | |
download | gitlab-ce-4f446dd45a4068a77f606c02c95389c5cf6a6647.tar.gz |
No user is needed to delete a project
Diffstat (limited to 'db')
-rw-r--r-- | db/post_migrate/20170502101023_clean_up_pending_delete_projects.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/db/post_migrate/20170502101023_clean_up_pending_delete_projects.rb b/db/post_migrate/20170502101023_clean_up_pending_delete_projects.rb index 52c7c160ea2..dd812964902 100644 --- a/db/post_migrate/20170502101023_clean_up_pending_delete_projects.rb +++ b/db/post_migrate/20170502101023_clean_up_pending_delete_projects.rb @@ -9,9 +9,6 @@ class CleanUpPendingDeleteProjects < ActiveRecord::Migration disable_ddl_transaction! def up - admin = User.find_by(admin: true) - return unless admin - Project.unscoped.where(pending_delete: true).each { |project| delete_project(project, admin) } end @@ -21,7 +18,7 @@ class CleanUpPendingDeleteProjects < ActiveRecord::Migration private - def delete_project(project, user) + def delete_project(project) project.team.truncate unlink_fork(project) if project.forked? |