mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-04 04:04:36 +08:00
Merge pull request #1275 from Zanz2/zz_adding_removing_table_sci2621
Fixed table add and remove crash [SCI-2621]
This commit is contained in:
commit
7cb50145a0
1 changed files with 1 additions and 0 deletions
|
@ -515,6 +515,7 @@ class StepsController < ApplicationController
|
|||
params[:tables_attributes].each do |_, table|
|
||||
next unless table['_destroy']
|
||||
table_to_destroy = Table.find_by_id(table['id'])
|
||||
next if table_to_destroy.nil?
|
||||
table_to_destroy.report_elements.destroy_all
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue