diff --git a/frontend/services/entities/hosts.ts b/frontend/services/entities/hosts.ts index b29e4b0d69..f413e0c212 100644 --- a/frontend/services/entities/hosts.ts +++ b/frontend/services/entities/hosts.ts @@ -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,