mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -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') != '') {
|
if ($this->request->get('model_id') != '') {
|
||||||
$model = AssetModel::find($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();
|
$rules += $model->fieldset->validation_rules();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue