When removing variant from order, if not found then do nothing

This commit is contained in:
Rohan Mitchell
2016-04-08 11:17:54 +10:00
parent 6fbbe580c5
commit 792e17c385
2 changed files with 8 additions and 1 deletions

View File

@@ -99,7 +99,7 @@ Spree::Order.class_eval do
def remove_variant(variant)
line_items(:reload)
current_item = find_line_item_by_variant(variant)
current_item.destroy
current_item.andand.destroy
end