Skip to content

fix(intune): don't refetch templates after deploying a policy - #902

Merged
KelvinTegelaar merged 1 commit into
CyberDrain:devfrom
kris6673:fix/policy-deploy-template-refetch
Oct 15, 2026
Merged

KelvinTegelaar merged 1 commit into
CyberDrain:devfrom
kris6673:fix/policy-deploy-template-refetch

Conversation

@kris6673

Copy link
Copy Markdown
Contributor

What

The Deploy Policy drawer (CippPolicyDeployDrawer) reloaded its template selector after every successful deploy.

Why

ApiPostCall was given relatedQueryKeys containing 'IntuneTemplates', which is the drawer's own template query key. On success it got invalidated and refetched, so the autocomplete flashed its loading state. Deploying a policy never changes the template list.

Change

  • Drop 'IntuneTemplates' from the hook-level relatedQueryKeys; the three tenant-scoped policy list keys stay, so the policy tables still refresh.
  • Remove the relatedQueryKeys array passed into deployPolicy.mutate(). ApiPostCall's mutationFn only reads url/data/bulkRequest/followUps, so it was never used (and its key names didn't match the real tenant-suffixed keys).

The manual "Refresh Templates" button is unchanged.

🤖 Generated with Claude Code

@KelvinTegelaar
KelvinTegelaar merged commit 7d08a9d into CyberDrain:dev Oct 15, 2026
16 checks passed
@kris6673
kris6673 deleted the fix/policy-deploy-template-refetch branch October 16, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants