Hopefully resolving order populator strangeness related to concurrency by ensuring a fresh list of line items

This commit is contained in:
Rob Harrington
2015-01-15 12:10:05 +11:00
parent 307cc313df
commit 06cf914119

View File

@@ -101,6 +101,7 @@ Spree::Order.class_eval do
# Overridden to support max_quantity
def add_variant(variant, quantity = 1, max_quantity = nil, currency = nil)
line_items(:reload)
current_item = find_line_item_by_variant(variant)
if current_item
Bugsnag.notify(RuntimeError.new("Order populator weirdness"), {