mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-15 02:35:47 +00:00
Merge pull request #211 from PetriAsi/fix/invoke-snipeit-method#210
return null when result count is 0
This commit is contained in:
commit
7a83c09370
1 changed files with 4 additions and 0 deletions
|
|
@ -127,6 +127,10 @@
|
||||||
elseif ($webResponse.status -eq 'success'){
|
elseif ($webResponse.status -eq 'success'){
|
||||||
$result = $webResponse.payload
|
$result = $webResponse.payload
|
||||||
}
|
}
|
||||||
|
#Search and query result with no results
|
||||||
|
elseif ($webResponse.total -eq 0){
|
||||||
|
$result = $null
|
||||||
|
}
|
||||||
#get operations with id returns just one object
|
#get operations with id returns just one object
|
||||||
else {
|
else {
|
||||||
$result = $webResponse
|
$result = $webResponse
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue