A free open source IT asset/license management system
cleanup + notes for monday
spencerrlongg997eddfed1bd
diff --git a/app/Http/Requests/StoreAssetRequest.php b/app/Http/Requests/StoreAssetRequest.phpindex 587116de42..b00baf90f7 100644--- a/app/Http/Requests/StoreAssetRequest.php+++ b/app/Http/Requests/StoreAssetRequest.php@@ -38,8 +38,6 @@ class StoreAssetRequest extends ImageUploadRequest'company_id' => $idForCurrentUser,'assigned_to' => $assigned_to ?? null,]);-- //$this->after();}/**diff --git a/app/Http/Requests/Traits/MayContainCustomFields.php b/app/Http/Requests/Traits/MayContainCustomFields.phpindex 5a3299b365..a506412fe7 100644--- a/app/Http/Requests/Traits/MayContainCustomFields.php+++ b/app/Http/Requests/Traits/MayContainCustomFields.php@@ -15,6 +15,7 @@ trait MayContainCustomFields});if (count($request_fields) > 0) {if ($this->method() == 'POST') {+ // refactor to eager load the fields???$request_fields->diff(AssetModel::find($this->model_id)->fieldset->fields->pluck('db_column'))->each(function ($request_field_name) use ($request_fields, $validator) {// i could probably add some more conditions here to determine whether or not the column exists but just not on this asset model@@ -23,9 +24,11 @@ trait MayContainCustomFields});} elseif ($this->method() == 'PUT' || $this->method() == 'PATCH') {// need to know about other pr before I can go down this route+ // it should be more or less the same, just have to get the asset model differently+ // ($this->asset should work if the other PR is accepted)+ return;}}-});}}