Skip to content

Commit

Permalink
Merge branch 'hosted-policy-detail-changes' of github.com:jfsiii/kiba…
Browse files Browse the repository at this point in the history
…na into hosted-policy-detail-changes
  • Loading branch information
John Schulz committed Apr 7, 2021
2 parents a5cafed + 18fca79 commit b52c468
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,10 @@ export const AgentListPage: React.FunctionComponent<{}> = () => {

const isAgentSelectable = (agent: Agent) => {
if (!agent.active) return false;
if (!agent.policy_id) return true;

const agentPolicy = agentPolicies.find((p) => p.id === agent.policy_id);
const isManaged = agent.policy_id && agentPolicy?.is_managed === true;
const agentPolicy = agentPoliciesIndexedById[agent.policy_id];
const isManaged = agentPolicy?.is_managed === true;
return !isManaged;
};

Expand Down

0 comments on commit b52c468

Please sign in to comment.