Small fix for Group Functional Tests

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2020-05-11 18:07:14 -07:00
parent 9ee28c7513
commit b9e821c0e6
No known key found for this signature in database
GPG key ID: 10BFFDA3ED34B5AC

View file

@ -28,6 +28,7 @@ class AssetRequest extends Request
public function rules()
{
$rules = [
'asset_tag' => 'required|min:1|max:255|unique_undeleted',
'name' => 'max:255|nullable',
'model_id' => 'required|integer|exists:models,id',
'status_id' => 'required|integer|exists:status_labels,id',
@ -46,8 +47,6 @@ class AssetRequest extends Request
$settings = \App\Models\Setting::getSettings();
$rules['asset_tag'] = ($settings->auto_increment_assets == '1') ? 'max:255' : 'required';
if ($this->request->get('model_id') != '') {
$model = AssetModel::find($this->request->get('model_id'));