提交 2bf36970 编写于 作者: X Xavier Noria

removes a unnecessary limit call

We are setting a limit unconditionally just below,
which overrides any existing one anyway.
上级 451437c6
......@@ -205,7 +205,6 @@ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore:
if limit_value
remaining = limit_value
batch_limit = remaining if remaining < batch_limit
relation = relation.limit(nil) # new relation without the limit
end
relation = relation.reorder(batch_order).limit(batch_limit)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册