summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-12-12 10:05:40 -0800
committerAleksei Lipniagov <alipniagov@gitlab.com>2019-08-21 13:24:44 +0300
commitc913a21caa43b84a6bbc5fa6d19d46a30231de21 (patch)
tree86b2f859d1da70f5ba60bc0f4b687d25ee94c906
parent9dce1a1f16c3f3227eeb79907e284336049ae924 (diff)
downloadgitlab-ce-sh-improve-memory-project-export.tar.gz
Move serialize_options where it's neededsh-improve-memory-project-export
-rw-r--r--lib/gitlab/import_export/project_hash_serializer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/import_export/project_hash_serializer.rb b/lib/gitlab/import_export/project_hash_serializer.rb
index befd985cc7f..dad803b32bc 100644
--- a/lib/gitlab/import_export/project_hash_serializer.rb
+++ b/lib/gitlab/import_export/project_hash_serializer.rb
@@ -54,7 +54,6 @@ module Gitlab
# in batches.
preload_data.each do |key, preload_clause|
records = project.send(key)
- selection = serialize_options(included_tree, key)
next unless records
@@ -64,6 +63,7 @@ module Gitlab
end
data[key.to_s] = []
+ selection = serialize_options(included_tree, key)
# Not all models use EachBatch, whereas ActiveRecord guarantees all models can use in_batches.
records.in_batches do |batch| # rubocop:disable Cop/InBatches