mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-31 21:37:16 +00:00
Remove dead code related to multiple product taxons
This commit is contained in:
committed by
Gaetan Craig-Riou
parent
fb09a7f1e6
commit
02abe5cc06
@@ -46,18 +46,12 @@ module Sets
|
||||
# variant.update( { price: xx.x } )
|
||||
#
|
||||
def update_product_attributes(attributes)
|
||||
split_taxon_ids!(attributes)
|
||||
|
||||
product = find_model(@collection, attributes[:id])
|
||||
return if product.nil?
|
||||
|
||||
update_product(product, attributes)
|
||||
end
|
||||
|
||||
def split_taxon_ids!(attributes)
|
||||
attributes[:taxon_ids] = attributes[:taxon_ids].split(',') if attributes[:taxon_ids].present?
|
||||
end
|
||||
|
||||
def update_product(product, attributes)
|
||||
return false unless update_product_only_attributes(product, attributes)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user