mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #11731 from chahmedejaz/bugfix/11667-clone-tags-issue-for-OC
Fix Cloning Tags Issue for OrderCycle
This commit is contained in:
@@ -90,6 +90,7 @@ class Exchange < ApplicationRecord
|
||||
exchange = dup
|
||||
exchange.order_cycle = new_order_cycle
|
||||
exchange.enterprise_fee_ids = enterprise_fee_ids
|
||||
exchange.tag_list = tag_list
|
||||
exchange.save!
|
||||
clone_all_exchange_variants(exchange.id)
|
||||
exchange
|
||||
|
||||
@@ -275,7 +275,7 @@ describe Exchange do
|
||||
|
||||
ex1 = oc.exchanges.last
|
||||
ex1.update_attribute(:tag_list, "wholesale")
|
||||
ex2 = ex1.clone! new_oc
|
||||
ex2 = ex1.reload.clone! new_oc
|
||||
|
||||
expect(ex1.sender_id).to eq ex2.sender_id
|
||||
expect(ex1.receiver_id).to eq ex2.receiver_id
|
||||
|
||||
Reference in New Issue
Block a user