mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-04 07:09:14 +00:00
Reset stock for unavailable products on OC open
This commit is contained in:
@@ -57,6 +57,10 @@ class OpenOrderCycleJob < ApplicationJob
|
||||
catalog = DfcCatalog.load(dfc_user, catalog_url)
|
||||
catalog.apply_wholesale_values!
|
||||
|
||||
variants = Spree::Variant.where(id: catalog_links.pluck(:subject_id))
|
||||
importer = DfcCatalogImporter.new(variants, catalog)
|
||||
importer.reset_absent_variants
|
||||
|
||||
catalog_links.each do |link|
|
||||
catalog_item = catalog.item(link.semantic_id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user