Only get fieldset rules if there if is a model selected

This commit is contained in:
snipe 2016-04-23 02:35:31 -07:00
parent 93e7715c28
commit 7a65fe8f89

View file

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