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/lib
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-06-23 17:13:17 +0300
committerRémy Coutable <remy@rymai.me>2016-06-23 17:13:17 +0300
commit6f6dcc366b0d74a8d9f4e29005af23ed2a31c33c (patch)
tree80b70f1bfd3aecf19e35cb9a795bae5e0a8c0a9d /lib
parent3eab71f930f5baf72b27f46a04f84ce6a9838c21 (diff)
parent79192a8437ddd2c909c01e024bdf0bb7a2212265 (diff)
Merge branch 'fix/import-export-gitlab-errors' into 'master'
Fix errors found on importing GitLab CE repo Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/18968 See merge request !4855
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/import_export/relation_factory.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/import_export/relation_factory.rb b/lib/gitlab/import_export/relation_factory.rb
index b872780f20a..92bf7e0a2fc 100644
--- a/lib/gitlab/import_export/relation_factory.rb
+++ b/lib/gitlab/import_export/relation_factory.rb
@@ -12,6 +12,8 @@ module Gitlab
USER_REFERENCES = %w[author_id assignee_id updated_by_id user_id].freeze
+ BUILD_MODELS = %w[Ci::Build commit_status].freeze
+
def self.create(*args)
new(*args).create
end
@@ -70,7 +72,7 @@ module Gitlab
end
def generate_imported_object
- if @relation_sym == 'commit_status' # call #trace= method after assigning the other attributes
+ if BUILD_MODELS.include?(@relation_name) # call #trace= method after assigning the other attributes
trace = @relation_hash.delete('trace')
imported_object do |object|
object.trace = trace