diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/project.rb | 3 | ||||
-rw-r--r-- | app/workers/namespaceless_project_destroy_worker.rb | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 22b347cc8f9..5416786b4aa 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1224,6 +1224,9 @@ class Project < ActiveRecord::Base # TODO: what to do here when not using Legacy Storage? Do we still need to rename and delay removal? def remove_pages + # Projects with a missing namespace cannot have their pages removed + return unless namespace + ::Projects::UpdatePagesConfigurationService.new(self).execute # 1. We rename pages to temporary directory diff --git a/app/workers/namespaceless_project_destroy_worker.rb b/app/workers/namespaceless_project_destroy_worker.rb index bfae0c77700..a9073742ff7 100644 --- a/app/workers/namespaceless_project_destroy_worker.rb +++ b/app/workers/namespaceless_project_destroy_worker.rb @@ -24,10 +24,6 @@ class NamespacelessProjectDestroyWorker unlink_fork(project) if project.forked? - # Override Project#remove_pages for this instance so it doesn't do anything - def project.remove_pages - end - project.destroy! end |