diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /app/models/project_import_state.rb | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'app/models/project_import_state.rb')
-rw-r--r-- | app/models/project_import_state.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/project_import_state.rb b/app/models/project_import_state.rb index 633e669b5fc..0f04eb7d4af 100644 --- a/app/models/project_import_state.rb +++ b/app/models/project_import_state.rb @@ -57,6 +57,12 @@ class ProjectImportState < ApplicationRecord end end + after_transition any => :failed do |state, _| + if Feature.enabled?(:remove_import_data_on_failure, state.project, default_enabled: :yaml) + state.project.remove_import_data + end + end + after_transition started: :finished do |state, _| project = state.project |