small fix for deleting category if not present
This commit is contained in:
parent
28163dbeba
commit
3abcd5a09a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue