Skip to content

Commit

Permalink
Invalidate assessments by app id on app fetch to fix assessment status
Browse files Browse the repository at this point in the history
  • Loading branch information
ibolton336 committed Nov 8, 2023
1 parent 3c95345 commit 0b34b8b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/src/app/queries/applications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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),
});
Expand Down

0 comments on commit 0b34b8b

Please sign in to comment.