diff options
-rw-r--r-- | lib/gitlab/import_export/project_hash_serializer.rb | 2 |
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 |