mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fix performance issue in loading payment methods
This was loading and initializing every payment method in the database, and every calculator for each of those payment methods.
🔥
This commit is contained in:
@@ -116,7 +116,7 @@ module Spree
|
||||
# Only show payments for the order's distributor
|
||||
@payment_methods = PaymentMethod.
|
||||
available(:back_end).
|
||||
select{ |pm| pm.has_distributor? @order.distributor }
|
||||
for_distributor(@order.distributor)
|
||||
|
||||
@payment_method = if @payment&.payment_method
|
||||
@payment.payment_method
|
||||
|
||||
Reference in New Issue
Block a user