diff --git a/app/controllers/steps_controller.rb b/app/controllers/steps_controller.rb index a098d0515..1d06edc96 100644 --- a/app/controllers/steps_controller.rb +++ b/app/controllers/steps_controller.rb @@ -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