Skip to content

Commit

Permalink
Merge pull request #3169 from aitbw/aitbw/remove-conditional
Browse files Browse the repository at this point in the history
Remove conditional when searching an order when creating a shipment
  • Loading branch information
kennyadsl authored Apr 15, 2019
2 parents 4d53bdc + f16bf46 commit ec6d58c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions api/app/controllers/spree/api/shipments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,8 @@ def load_transfer_params
end

def find_order_on_create
# TODO: Can remove conditional here once deprecated #find_order is removed.
unless @order.present?
@order = Spree::Order.find_by!(number: params[:shipment][:order_id])
authorize! :read, @order
end
@order = Spree::Order.find_by!(number: params[:shipment][:order_id])
authorize! :read, @order
end

def find_shipment
Expand Down

0 comments on commit ec6d58c

Please sign in to comment.