Merge pull request #6701 from Matt-Yorkley/admin-order-performance

Fix performance issue in loading payment methods
This commit is contained in:
Andy Brett
2021-01-21 10:58:35 -08:00
committed by GitHub

View File

@@ -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