mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Per review, use exists? so we run only one query
This commit is contained in:
@@ -51,9 +51,8 @@ Flipper.register(:old_enterprise_with_no_inventory) do |actor|
|
||||
enterprise_with_no_variant_override = Enterprise
|
||||
.where.not(id: enterprise_with_variant_override)
|
||||
.where("created_at < ?", "2025-08-11")
|
||||
.pluck(:id)
|
||||
|
||||
enterprise_with_no_variant_override.include?(actor.id)
|
||||
enterprise_with_no_variant_override.exists?(actor.id)
|
||||
end
|
||||
|
||||
Flipper::UI.configure do |config|
|
||||
|
||||
Reference in New Issue
Block a user