mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Fixed crash if no model associated
This should never be triggered. Bad data is getting in somehow.
This commit is contained in:
parent
11505d5d06
commit
cf8feb37e1
|
@ -81,7 +81,7 @@ class AssetsTransformer
|
|||
];
|
||||
|
||||
|
||||
if (($asset->model->fieldset) && (count($asset->model->fieldset->fields)> 0)) {
|
||||
if (($asset->model) && ($asset->model->fieldset) && (count($asset->model->fieldset->fields)> 0)) {
|
||||
$fields_array = array();
|
||||
|
||||
foreach ($asset->model->fieldset->fields as $field) {
|
||||
|
|
Loading…
Reference in a new issue