mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Only get fieldset rules if there if is a model selected
This commit is contained in:
parent
93e7715c28
commit
7a65fe8f89
|
@ -40,7 +40,7 @@ class AssetRequest extends Request
|
|||
|
||||
$model = AssetModel::find($this->request->get('model_id'));
|
||||
|
||||
if ($model->fieldset)
|
||||
if (($model) && ($model->fieldset))
|
||||
{
|
||||
$rules += $model->fieldset->validation_rules();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue