Skip to content

Commit

Permalink
Invalidate list policies when attaching to resources
Browse files Browse the repository at this point in the history
  • Loading branch information
JBWatenbergScality committed Jun 27, 2022
1 parent a24a5b2 commit 5c6c98e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ function AttachmentConfirmationModal({
queryClient.invalidateQueries(
getListEntitiesForPolicyQuery(resourceId, IAMClient),
);
queryClient.refetchQueries(
getListPoliciesQuery(
notFalsyTypeGuard(account).Name,
notFalsyTypeGuard(IAMClient),
)
);
if (flatEntity.type === 'user') {
queryClient.refetchQueries(
getListAttachedUserPoliciesQuery(
Expand Down

0 comments on commit 5c6c98e

Please sign in to comment.