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
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-01-14 22:44:36 +0300
committerStan Hu <stanhu@gmail.com>2019-01-14 22:45:46 +0300
commit27ba546ec8dec5a64f030ec50aa53c447e1628d4 (patch)
treed98daa4e65b5e8c86e368fc4c09600672ada9898 /app/models/project_import_data.rb
parent1a5de8955ae173946c9814645b3dc0d88a9e4de9 (diff)
Add clear_credentials method to ProjectImportData
This backports changes made in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9134.
Diffstat (limited to 'app/models/project_import_data.rb')
-rw-r--r--app/models/project_import_data.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/project_import_data.rb b/app/models/project_import_data.rb
index 525725034a5..aa0c121fe99 100644
--- a/app/models/project_import_data.rb
+++ b/app/models/project_import_data.rb
@@ -30,4 +30,8 @@ class ProjectImportData < ActiveRecord::Base
def merge_credentials(hash)
self.credentials = credentials.to_h.merge(hash) unless hash.empty?
end
+
+ def clear_credentials
+ self.credentials = {}
+ end
end