mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-09 22:23:28 +08:00
fixed multiple tables check
This commit is contained in:
parent
111cb81d08
commit
4afaa50ce0
1 changed files with 1 additions and 1 deletions
|
@ -520,7 +520,7 @@ class StepsController < ApplicationController
|
|||
def delete_step_tables(params)
|
||||
return unless params[:tables_attributes].present?
|
||||
params[:tables_attributes].each do |table|
|
||||
next unless table.second['_destroy'] != 1
|
||||
next unless table.second['_destroy']
|
||||
table_to_destroy = Table.find_by(id: table.second['id'])
|
||||
table_to_destroy.report_elements.destroy_all
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue