Skip to content

Commit

Permalink
Small fix for Group Functional Tests
Browse files Browse the repository at this point in the history
Signed-off-by: snipe <[email protected]>
  • Loading branch information
snipe committed May 12, 2020
1 parent 9ee28c7 commit b9e821c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/Http/Requests/AssetRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function authorize()
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',
Expand All @@ -45,9 +46,7 @@ public function rules()
];

$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'));

Expand Down

0 comments on commit b9e821c

Please sign in to comment.