don't try to get live stats for items that haven't been configured

This commit is contained in:
KodeStar
2018-02-08 20:58:07 +00:00
parent 912c6512fb
commit b2dd3f803e
4 changed files with 39 additions and 6 deletions

View File

@@ -139,8 +139,7 @@ class ItemController extends Controller
]);
}
$config = $request->input('config');
$config = (!empty($config)) ? json_encode($config) : null;
$config = Item::checkConfig($request->input('config'));
$request->merge([
'description' => $config
]);
@@ -201,12 +200,10 @@ class ItemController extends Controller
]);
}
$config = $request->input('config');
$config = (!empty($config)) ? json_encode($config) : null;
$config = Item::checkConfig($request->input('config'));
$request->merge([
'description' => $config
]);
Item::find($id)->update($request->all());