small fix for deleting category if not present
This commit is contained in:
1 parent
28163dbeba
commit
3abcd5a09a
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user