Skip to content

Commit

Permalink
refactor(api): Reset candidate state only if eligibility data has cha…
Browse files Browse the repository at this point in the history
…nged

- Updated `createOrUpdateEligibilityRequirement` to reset candidate state only when eligibility requirement or validity date has changed.
  • Loading branch information
ThomasDos committed Aug 13, 2024
1 parent 040cc77 commit b13bbc3
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ export const createOrUpdateEligibilityRequirement = async ({
});
}

if (dFF.sentToCandidateAt) {
if (
dFF.sentToCandidateAt &&
(hasChangedEligibilityRequirement || hasChangedEligibilityValidUntil)
) {
await resetDFFSentToCandidateState(dFF);
}

Expand Down

0 comments on commit b13bbc3

Please sign in to comment.