diff --git a/app/controllers/admin/universal_tables_controller.rb b/app/controllers/admin/universal_tables_controller.rb index 262e8f3..d8aa01b 100644 --- a/app/controllers/admin/universal_tables_controller.rb +++ b/app/controllers/admin/universal_tables_controller.rb @@ -193,7 +193,7 @@ class Admin::UniversalTablesController < OrbitAdminController def destroy uid = params[:id].split("-").last table = UTable.where(:uid => uid).first - table.category.destroy + table.category.destroy if !table.category.nil? table.destroy redirect_to admin_universal_tables_path end