From c913a21caa43b84a6bbc5fa6d19d46a30231de21 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Wed, 12 Dec 2018 10:05:40 -0800 Subject: Move serialize_options where it's needed --- lib/gitlab/import_export/project_hash_serializer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1