mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-22 23:03:00 +08:00
Fix protocol id on protocol show page [SCI-8005] (#5033)
This commit is contained in:
parent
bda3661a9b
commit
3735ba51b8
1 changed files with 4 additions and 0 deletions
|
@ -41,6 +41,10 @@ class ProtocolSerializer < ActiveModel::Serializer
|
|||
object.protocol_keywords.map { |i| { label: i.name, value: i.name } }
|
||||
end
|
||||
|
||||
def code
|
||||
object&.parent&.code || object.code
|
||||
end
|
||||
|
||||
def description_view
|
||||
@user = @instance_options[:user]
|
||||
custom_auto_link(object.tinymce_render('description'),
|
||||
|
|
Loading…
Reference in a new issue