Permalink
Browse files

BUGFIX: Handle LineItems which are unquotable

  • Loading branch information...
1 parent 7891d4f commit e33dcde6b7146aa0b53c34df2992032bdcddbe49 Jason Stirk committed Dec 7, 2012
@@ -95,7 +95,9 @@ def find_quotes(destination, line_items)
begin
request = Temando::Request.new
line_items.reject { |i| i.quantity < 1 }.each do |item|
- request.items << item.to_temando_item
+ item = item.to_temando_item
+ return nil if item.nil?
+ request.items << item
end
request.quotes_for(delivery)
@@ -2,6 +2,7 @@ module SpreeTemando
module LineItemShippingDecorator
def to_temando_item
item = self.variant.to_temando_item
+ return nil if item.nil?
item.quantity = self.quantity
item
end
@@ -1,3 +1,3 @@
module SpreeTemando
- VERSION = "0.3.0"
+ VERSION = "0.3.1"
end

0 comments on commit e33dcde

Please sign in to comment.