mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-24 16:55:09 +08:00
Fix checklists in read-only mode [SCI-9488]
This commit is contained in:
parent
5265312125
commit
7bdef42523
1 changed files with 3 additions and 1 deletions
|
@ -25,7 +25,9 @@ class ChecklistSerializer < ActiveModel::Serializer
|
|||
end
|
||||
|
||||
def urls
|
||||
return {} if object.destroyed? || !can_manage_step?(scope[:user] || @instance_options[:user], object.step)
|
||||
if object.destroyed? || !can_manage_step?(scope[:user] || @instance_options[:user], object.step)
|
||||
return { checklist_items_url: step_checklist_checklist_items_path(object.step, object) }
|
||||
end
|
||||
|
||||
{
|
||||
checklist_items_url: step_checklist_checklist_items_path(object.step, object),
|
||||
|
|
Loading…
Reference in a new issue