mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
De-duplicate early for better performance
This commit is contained in:
@@ -18,7 +18,7 @@ class OrderAvailableShippingMethods
|
||||
|
||||
tag_rules.filter!(shipping_methods)
|
||||
|
||||
shipping_methods.uniq
|
||||
shipping_methods
|
||||
end
|
||||
|
||||
private
|
||||
@@ -30,7 +30,7 @@ class OrderAvailableShippingMethods
|
||||
distributor.shipping_methods.where(
|
||||
id: available_distributor_shipping_methods_ids
|
||||
)
|
||||
end.frontend.to_a
|
||||
end.frontend.to_a.uniq
|
||||
end
|
||||
|
||||
def available_distributor_shipping_methods_ids
|
||||
|
||||
Reference in New Issue
Block a user