mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-23 12:44:12 -08:00
Small fix for Group Functional Tests
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
9ee28c7513
commit
b9e821c0e6
|
@ -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',
|
||||
|
@ -45,9 +46,7 @@ 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'));
|
||||
|
||||
|
|
Loading…
Reference in a new issue