Better handle models without a fieldset in the asset request [RB 9935]

This commit is contained in:
snipe 2020-04-09 11:18:54 -07:00
parent 48dfc699d7
commit cfec142c3b
No known key found for this signature in database
GPG key ID: 10BFFDA3ED34B5AC

View file

@ -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();
}
}