From bb42109c0c76b6709f39190ae4a1daa55865d306 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 11 May 2020 18:10:45 -0700 Subject: [PATCH] Added a clarifying comment Signed-off-by: snipe --- app/Http/Requests/AssetRequest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Http/Requests/AssetRequest.php b/app/Http/Requests/AssetRequest.php index 082320e6ba..65219f5408 100644 --- a/app/Http/Requests/AssetRequest.php +++ b/app/Http/Requests/AssetRequest.php @@ -27,6 +27,9 @@ class AssetRequest extends Request */ public function rules() { + // Below, asset_tag is duplicated here and in the model, largely because + // the functional tests will fail because of the way Form Requests work in + // Laravel. $rules = [ 'asset_tag' => 'required|min:1|max:255|unique_undeleted', 'name' => 'max:255|nullable', @@ -46,7 +49,7 @@ class AssetRequest extends Request ]; $settings = \App\Models\Setting::getSettings(); - + if ($this->request->get('model_id') != '') { $model = AssetModel::find($this->request->get('model_id'));