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
|
def destroy
|
||||||
uid = params[:id].split("-").last
|
uid = params[:id].split("-").last
|
||||||
table = UTable.where(:uid => uid).first
|
table = UTable.where(:uid => uid).first
|
||||||
table.category.destroy
|
table.category.destroy if !table.category.nil?
|
||||||
table.destroy
|
table.destroy
|
||||||
redirect_to admin_universal_tables_path
|
redirect_to admin_universal_tables_path
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue