mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-14 01:24:06 -08:00
rm code, was probably fixed through rules at some point
This commit is contained in:
parent
9e84521098
commit
901b1b83d0
|
@ -20,15 +20,6 @@ class StoreAssetRequest extends ImageUploadRequest
|
||||||
|
|
||||||
public function prepareForValidation(): void
|
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([
|
$this->merge([
|
||||||
'asset_tag' => $this->asset_tag ?? Asset::autoincrement_asset(),
|
'asset_tag' => $this->asset_tag ?? Asset::autoincrement_asset(),
|
||||||
'company_id' => Company::getIdForCurrentUser($this->company_id),
|
'company_id' => Company::getIdForCurrentUser($this->company_id),
|
||||||
|
|
Loading…
Reference in a new issue