Merge pull request #6776 from Matt-Yorkley/dead-argument

Dead code: superfluous argument in CartService#populate
This commit is contained in:
Pau Pérez Fabregat
2021-02-01 16:49:02 +01:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -11,7 +11,7 @@ class CartController < BaseController
Spree::Adjustment.without_callbacks do
cart_service = CartService.new(order)
cart_service.populate(params.slice(:products, :variants, :quantity), true)
cart_service.populate(params.slice(:variants, :quantity), true)
if cart_service.valid?
order.update_distribution_charge!
order.cap_quantity_at_stock!

View File

@@ -1,5 +1,7 @@
require 'open_food_network/scope_variant_to_hub'
# Previously Spree::OrderPopulator. Modified to work with max_quantity and variant overrides.
class CartService
attr_accessor :order, :currency
attr_reader :variants_h