Fix crash if no asset model

(This should never happen, but shouldn’t crash if/when it does)
This commit is contained in:
snipe 2018-01-25 00:25:43 -08:00
parent 1d04897b32
commit 11505d5d06

View file

@ -624,7 +624,7 @@ class ReportsController extends Controller
}
if ($request->has('category')) {
$row[] = ($asset->model->category) ? $asset->model->category->name : '';
$row[] = (($asset->model) && ($asset->model->category)) ? $asset->model->category->name : '';
}
if ($request->has('manufacturer')) {