mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-13 18:02:30 +00:00
Don't require status_id or model_id when updating asset
This commit is contained in:
parent
fdf52ce2e4
commit
35a4ab68fe
1 changed files with 7 additions and 5 deletions
|
|
@ -59,12 +59,14 @@ function Set-Asset()
|
|||
[hashtable] $customfields
|
||||
)
|
||||
|
||||
$Values = @{
|
||||
"name" = $Name
|
||||
"status_id" = $status_id
|
||||
"model_id" = $model_id
|
||||
}
|
||||
$Values = @{}
|
||||
|
||||
if ($Name) { $Values.Add('name',$Name)}
|
||||
|
||||
if ($status_id) { $Values.Add('status_id',$status_id)}
|
||||
|
||||
if ($model_id) { $Values.Add('model_id',$model_id)}
|
||||
|
||||
if ($customfields)
|
||||
{
|
||||
$Values += $customfields
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue