mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-10 09:28:37 +08:00
Merge pull request #4285 from aignatov-bio/ai-sci-6965-fix-copy-protocol-to-repository
Fix protocol save to repository [SCI-6965]
This commit is contained in:
commit
264a60dc55
1 changed files with 4 additions and 3 deletions
|
@ -253,9 +253,10 @@ class Protocol < ApplicationRecord
|
|||
end
|
||||
end
|
||||
|
||||
def self.clone_contents(src, dest, current_user, clone_keywords)
|
||||
def self.clone_contents(src, dest, current_user, clone_keywords, only_contents = false)
|
||||
assets_to_clone = []
|
||||
dest.update(description: src.description, name: src.name)
|
||||
dest.update(description: src.description, name: src.name) unless only_contents
|
||||
|
||||
src.clone_tinymce_assets(dest, dest.team)
|
||||
|
||||
# Update keywords
|
||||
|
@ -736,7 +737,7 @@ class Protocol < ApplicationRecord
|
|||
|
||||
raise ActiveRecord::RecordNotSaved unless success
|
||||
|
||||
Protocol.clone_contents(self, clone, current_user, true)
|
||||
Protocol.clone_contents(self, clone, current_user, true, true)
|
||||
|
||||
clone.reload
|
||||
clone
|
||||
|
|
Loading…
Reference in a new issue