Merge pull request #1275 from Zanz2/zz_adding_removing_table_sci2621

Fixed table add and remove crash [SCI-2621]
This commit is contained in:
Zanz2 2018-09-11 09:37:07 +02:00 committed by GitHub
commit 7cb50145a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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