mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-01 04:32:16 +08:00
Remove cascading save from step
This commit is contained in:
parent
2e45093856
commit
4f7f257b78
1 changed files with 0 additions and 32 deletions
|
@ -198,37 +198,5 @@ class Step < ApplicationRecord
|
|||
|
||||
def set_last_modified_by
|
||||
self.last_modified_by_id ||= user_id
|
||||
|
||||
tables.each do |t|
|
||||
t.created_by_id ||= last_modified_by_id
|
||||
if t.changed?
|
||||
t.last_modified_by_id = last_modified_by_id
|
||||
t.save!
|
||||
end
|
||||
end
|
||||
|
||||
assets.each do |a|
|
||||
a.created_by_id ||= last_modified_by_id
|
||||
if a.changed?
|
||||
a.last_modified_by_id = last_modified_by_id
|
||||
a.save!
|
||||
end
|
||||
end
|
||||
|
||||
checklists.each do |checklist|
|
||||
checklist.created_by_id ||= last_modified_by_id
|
||||
if checklist.changed?
|
||||
checklist.last_modified_by_id = last_modified_by_id
|
||||
checklist.save!
|
||||
end
|
||||
|
||||
checklist.checklist_items.each do |checklist_item|
|
||||
checklist_item.created_by_id ||= last_modified_by_id
|
||||
if checklist_item.changed?
|
||||
checklist_item.last_modified_by_id = last_modified_by_id
|
||||
checklist_item.save!
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue