Skip to content

Commit

Permalink
No need to call order.create_proposed_shipments twice [Fixes solidu…
Browse files Browse the repository at this point in the history
…sio#3181]

Shipments are already destroyed and created every time order moves from
address to delivery
  • Loading branch information
huoxito authored and GeekOnCoffee committed Jun 12, 2013
1 parent b504cc7 commit 4c67455
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
5 changes: 0 additions & 5 deletions api/app/controllers/spree/api/checkouts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,6 @@ def before_address
@order.ship_address ||= Address.default
end

def before_delivery
return if params[:order].present?
@order.create_proposed_shipments
end

def before_payment
@order.payments.destroy_all if request.put?
end
Expand Down
2 changes: 0 additions & 2 deletions frontend/app/controllers/spree/checkout_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ def before_address
def before_delivery
return if params[:order].present?

@order.create_proposed_shipments

packages = @order.shipments.map { |s| s.to_package }
@differentiator = Spree::Stock::Differentiator.new(@order, packages)
end
Expand Down

0 comments on commit 4c67455

Please sign in to comment.