diff --git a/app/Http/Controllers/Admin/CategoryController.php b/app/Http/Controllers/Admin/CategoryController.php index 1229ac6..d68be70 100644 --- a/app/Http/Controllers/Admin/CategoryController.php +++ b/app/Http/Controllers/Admin/CategoryController.php @@ -58,7 +58,7 @@ class CategoryController extends XController $category->subtitle = $request->input('subtitle'); $category->icon = $request->input('icon'); $category->description = $request->input('description'); - if ($category->parent_id != ''){ + if ($category->parent_id == ''){ $category->parent_id = $request->input('parent_id',null); } if ($request->has('canonical') && trim($request->input('canonical')) != ''){ diff --git a/app/Http/Controllers/Admin/GroupController.php b/app/Http/Controllers/Admin/GroupController.php index a226794..51a4ee1 100644 --- a/app/Http/Controllers/Admin/GroupController.php +++ b/app/Http/Controllers/Admin/GroupController.php @@ -56,7 +56,7 @@ class GroupController extends XController $group->name = $request->input('name'); $group->subtitle = $request->input('subtitle'); $group->description = $request->input('description'); - if ($group->parent_id != ''){ + if ($group->parent_id == ''){ $group->parent_id = $request->input('parent_id',null); } if ($request->has('canonical') && trim($request->input('canonical')) != ''){