From 0b34b8be26b64805fa42d9aef184d9afbf684a64 Mon Sep 17 00:00:00 2001 From: ibolton336 Date: Wed, 8 Nov 2023 14:56:04 -0500 Subject: [PATCH] Invalidate assessments by app id on app fetch to fix assessment status --- client/src/app/queries/applications.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/app/queries/applications.ts b/client/src/app/queries/applications.ts index e2d034de50..1adf91d17f 100644 --- a/client/src/app/queries/applications.ts +++ b/client/src/app/queries/applications.ts @@ -21,7 +21,10 @@ import { updateApplication, } from "@app/api/rest"; import { reviewsQueryKey } from "./reviews"; -import { assessmentsQueryKey } from "./assessments"; +import { + assessmentsByItemIdQueryKey, + assessmentsQueryKey, +} from "./assessments"; import saveAs from "file-saver"; export const ApplicationDependencyQueryKey = "applicationdependencies"; @@ -43,6 +46,7 @@ export const useFetchApplications = (refetchDisabled: boolean = false) => { onSuccess: () => { queryClient.invalidateQueries([reviewsQueryKey]); queryClient.invalidateQueries([assessmentsQueryKey]); + queryClient.invalidateQueries([assessmentsByItemIdQueryKey]); }, onError: (error: AxiosError) => console.log(error), });