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:
Maikel Linke
2023-07-28 17:20:54 +10:00
parent 4a13576f78
commit faeb8ae8f8

View File

@@ -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