mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fix Exchange clone tagging
The validation of ActsAsTaggableOn::Taggable failed when trying to copy tag ids during cloning. But I found that it's totally unnecessary because `Exchange.dup` copies the `tag_list` attribute already and it gets saved correctly. There's an existing spec for this.
This commit is contained in:
@@ -90,7 +90,6 @@ class Exchange < ApplicationRecord
|
||||
exchange = dup
|
||||
exchange.order_cycle = new_order_cycle
|
||||
exchange.enterprise_fee_ids = enterprise_fee_ids
|
||||
exchange.tag_ids = tag_ids
|
||||
exchange.save!
|
||||
clone_all_exchange_variants(exchange.id)
|
||||
exchange
|
||||
|
||||
Reference in New Issue
Block a user