Commit fdce217f authored by Aleksei Lipniagov's avatar Aleksei Lipniagov

Fix Cop/LineBreakAroundConditionalBlock failure

parent ebe7c4c8
......@@ -135,7 +135,10 @@ module Gitlab
data = []
record.in_batches(of: @batch_size) do |batch| # rubocop:disable Cop/InBatches
# rubocop:disable Cop/InBatches
# If we put `rubocop:disable` inline after `do |batch|`,
# `Cop/LineBreakAroundConditionalBlock` will fail
record.in_batches(of: @batch_size) do |batch|
if Feature.enabled?(:export_fast_serialize_with_raw_json, default_enabled: true)
data.append(JSONBatchRelation.new(batch, options, preloads[key]).tap(&:raw_json))
else
......@@ -143,6 +146,7 @@ module Gitlab
data += batch.as_json(options)
end
end
# rubocop:enable Cop/InBatches
data
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment