rm code, was probably fixed through rules at some point

This commit is contained in:
spencerrlongg 2024-01-02 18:27:17 -06:00
parent 9e84521098
commit 901b1b83d0

View file

@ -20,15 +20,6 @@ class StoreAssetRequest extends ImageUploadRequest
public function prepareForValidation(): void
{
// this needed to be added in because the observer fails if `assigned_to` is null :shrug:
if ($this->has('assigned_user')) {
$assigned_to = $this->assigned_user;
} elseif ($this->has('assigned_location')) {
$assigned_to = $this->assigned_location;
} elseif ($this->has('assigned_asset')) {
$assigned_to = $this->assigned_asset;
}
$this->merge([
'asset_tag' => $this->asset_tag ?? Asset::autoincrement_asset(),
'company_id' => Company::getIdForCurrentUser($this->company_id),