Skip to content

Commit

Permalink
fix: use correct late redemption enablement key
Browse files Browse the repository at this point in the history
Renames:

`isLateRedemptionEnabled` -> `isLateRedemptionAllowed`

I can't quite fathom how this was wrong, but it's abundantly clear in
the API serializer that the correct value should be
`isLateRedemptionAllowed`.

ENT-9259
  • Loading branch information
pwnage101 committed Jul 24, 2024
1 parent e354666 commit 1b6e5f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const redeemablePolicies = [
id: 456,
subsidyExpirationDate: mockSubsidyExpirationDate,
learnerContentAssignments: [mockContentAssignment],
isLateRedemptionEnabled: true,
isLateRedemptionAllowed: true,
},
];
const expectedTransformedPolicies = redeemablePolicies.map((policy) => ({
Expand Down
4 changes: 2 additions & 2 deletions src/components/app/data/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,10 @@ export function getLateRedemptionBufferDays(redeemablePolicies) {
return undefined;
}
const anyPolicyHasLateRedemptionEnabled = redeemablePolicies.some((policy) => (
// is_late_redemption_enabled=True on the serialized policy represents the fact that late
// is_late_redemption_allowed=True on the serialized policy represents the fact that late
// redemption has been temporarily enabled by an operator for the policy. It will toggle
// itself back to False after a finite period of time.
policy.isLateRedemptionEnabled
policy.isLateRedemptionAllowed
));
const isEnrollableBufferDays = anyPolicyHasLateRedemptionEnabled ? LATE_ENROLLMENTS_BUFFER_DAYS : undefined;
return isEnrollableBufferDays;
Expand Down

0 comments on commit 1b6e5f4

Please sign in to comment.