diff --git a/frontend/pages/policies/PolicyPage/PolicyPage.tsx b/frontend/pages/policies/PolicyPage/PolicyPage.tsx index 04e965758f..3dacdd6b1f 100644 --- a/frontend/pages/policies/PolicyPage/PolicyPage.tsx +++ b/frontend/pages/policies/PolicyPage/PolicyPage.tsx @@ -145,10 +145,7 @@ const PolicyPage = ({ error: storedPolicyError, } = useQuery( ["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,