fixed parent bug

master
A1Gard 3 weeks ago
parent 1d300cd039
commit 11619dcdb1

@ -58,7 +58,7 @@ class CategoryController extends XController
$category->subtitle = $request->input('subtitle'); $category->subtitle = $request->input('subtitle');
$category->icon = $request->input('icon'); $category->icon = $request->input('icon');
$category->description = $request->input('description'); $category->description = $request->input('description');
if ($category->parent_id != ''){ if ($category->parent_id == ''){
$category->parent_id = $request->input('parent_id',null); $category->parent_id = $request->input('parent_id',null);
} }
if ($request->has('canonical') && trim($request->input('canonical')) != ''){ if ($request->has('canonical') && trim($request->input('canonical')) != ''){

@ -56,7 +56,7 @@ class GroupController extends XController
$group->name = $request->input('name'); $group->name = $request->input('name');
$group->subtitle = $request->input('subtitle'); $group->subtitle = $request->input('subtitle');
$group->description = $request->input('description'); $group->description = $request->input('description');
if ($group->parent_id != ''){ if ($group->parent_id == ''){
$group->parent_id = $request->input('parent_id',null); $group->parent_id = $request->input('parent_id',null);
} }
if ($request->has('canonical') && trim($request->input('canonical')) != ''){ if ($request->has('canonical') && trim($request->input('canonical')) != ''){

Loading…
Cancel
Save