Merge pull request #4306 from okriuchykhin/ok_SCI_7043

Fix copying of TinyMCE images when loading protocol from repository [SCI-7043]
This commit is contained in:
Alex Kriuchykhin 2022-08-02 16:37:38 +02:00 committed by GitHub
commit 9077b4ace2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -288,6 +288,9 @@ class Protocol < ApplicationRecord
)
step_text2.save!
# Copy steps tinyMce assets
step_text.clone_tinymce_assets(step_text2, dest.team)
step2.step_orderable_elements.create!(
position: step_text.step_orderable_element.position,
orderable: step_text2
@ -344,9 +347,6 @@ class Protocol < ApplicationRecord
orderable: table2.step_table
)
end
# Copy steps tinyMce assets
step.clone_tinymce_assets(step2, dest.team)
end
# Call clone helper
Protocol.delay(queue: :assets).deep_clone_assets(assets_to_clone)