mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Better handle models without a fieldset in the asset request [RB 9935]
This commit is contained in:
parent
48dfc699d7
commit
cfec142c3b
|
@ -51,7 +51,7 @@ class AssetRequest extends Request
|
|||
if ($this->request->get('model_id') != '') {
|
||||
$model = AssetModel::find($this->request->get('model_id'));
|
||||
|
||||
if (($model) && ($model->fieldset)) {
|
||||
if (($model) && (isset($model->fieldset)) && ($model->fieldset)) {
|
||||
$rules += $model->fieldset->validation_rules();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue