From cfec142c3bb616dfd2ab1112c37a5ceab7805ad9 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 9 Apr 2020 11:18:54 -0700 Subject: [PATCH] Better handle models without a fieldset in the asset request [RB 9935] --- app/Http/Requests/AssetRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Requests/AssetRequest.php b/app/Http/Requests/AssetRequest.php index 1934f8254e..72c3a89ccb 100644 --- a/app/Http/Requests/AssetRequest.php +++ b/app/Http/Requests/AssetRequest.php @@ -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(); } }