From faeb8ae8f8750a6fcd16e813ac8ca9da123cf86a Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 28 Jul 2023 17:20:54 +1000 Subject: [PATCH] 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. --- app/models/exchange.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/models/exchange.rb b/app/models/exchange.rb index 8dbf3faf27..f244201398 100644 --- a/app/models/exchange.rb +++ b/app/models/exchange.rb @@ -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