Fleet FE: Do not pass empty search string to API for bulk transfer/delete hosts (#17525)

This commit is contained in:
RachelElysia 2024-03-11 12:08:41 -04:00 committed by GitHub
parent d4ba30cfa1
commit b2c089c351
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -218,7 +218,7 @@ export default {
const { HOSTS_DELETE } = endpoints;
return sendRequest("POST", HOSTS_DELETE, {
filters: {
query,
query: query || undefined, // Prevents empty string passed to API which as of 4.47 will return an error
status,
label_id: labelId,
team_id: teamId,
@ -441,7 +441,7 @@ export default {
return sendRequest("POST", HOSTS_TRANSFER_BY_FILTER, {
team_id: teamId,
filters: {
query,
query: query || undefined, // Prevents empty string passed to API which as of 4.47 will return an error
status,
label_id: labelId,
team_id: currentTeam,