mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-02 02:11:33 +00:00
Set unit_value to true when cloning a product
This value doesn't get persisted, but it's presence is validated. The product's duplicated variants store the actual :unit_value attribute
(cherry picked from commit 1e36043a2e)
This commit is contained in:
@@ -24,6 +24,7 @@ module Spree
|
||||
new_product.created_at = nil
|
||||
new_product.deleted_at = nil
|
||||
new_product.updated_at = nil
|
||||
new_product.unit_value = true
|
||||
new_product.product_properties = reset_properties
|
||||
new_product.image = duplicate_image(product.image) if product.image
|
||||
new_product.variants = duplicate_variants
|
||||
|
||||
Reference in New Issue
Block a user