Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet committed Jun 12, 2024
1 parent fac1b82 commit 7e51ab0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x-pack/plugins/fleet/server/services/agent_policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,8 @@ class AgentPolicyService {
kuery: `${AGENTS_PREFIX}.policy_id:${agentPolicy.id}`,
}
).then(({ total }) => (agentPolicy.agents = total));
} else {
agentPolicy.agents = 0;
}

return agentPolicy;
Expand All @@ -551,8 +553,6 @@ class AgentPolicyService {
});
}

agentPolicies.forEach((item) => (item.agents = 0));

return {
items: agentPolicies,
total: agentPoliciesSO.total,
Expand Down

0 comments on commit 7e51ab0

Please sign in to comment.