mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Fix crash if no asset model
(This should never happen, but shouldn’t crash if/when it does)
This commit is contained in:
parent
1d04897b32
commit
11505d5d06
|
@ -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')) {
|
||||
|
|
Loading…
Reference in a new issue