mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Hopefully resolving order populator strangeness related to concurrency by ensuring a fresh list of line items
This commit is contained in:
@@ -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"), {
|
||||
|
||||
Reference in New Issue
Block a user