mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Unreleased bug: Fix inherited policy API call bug (#11412)
This commit is contained in:
parent
56a1658579
commit
4fdf640820
1 changed files with 1 additions and 4 deletions
|
|
@ -145,10 +145,7 @@ const PolicyPage = ({
|
|||
error: storedPolicyError,
|
||||
} = useQuery<IStoredPolicyResponse, Error, IPolicy>(
|
||||
["policy", policyId],
|
||||
() =>
|
||||
teamIdForApi
|
||||
? teamPoliciesAPI.load(teamIdForApi, policyId as number)
|
||||
: globalPoliciesAPI.load(policyId as number),
|
||||
() => globalPoliciesAPI.load(policyId as number), // Note: Team members have access to policies through global API
|
||||
{
|
||||
enabled: isRouteOk && !!policyId, // Note: this justifies the number type assertions above
|
||||
refetchOnWindowFocus: false,
|
||||
|
|
|
|||
Loading…
Reference in a new issue