Skip to content

Commit

Permalink
preventrate being read as a linked rate just because its unlocked (#2358
Browse files Browse the repository at this point in the history
)
  • Loading branch information
pearl-truss authored Apr 9, 2024
1 parent a9eabdd commit adc5425
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const convertRateFormToGQLRateFormData = (
// if rate is not passed in, return an empty RateForm // we need to pass in the s3 handler because 3 urls generated client-side
// useLatestSubmission means to pull the latest submitted info rather than the draft info
const convertGQLRateToRateForm = (getKey: S3ClientT['getKey'], rate?: Rate): FormikRateForm => {
const handleAsLinkedRate = rate?.status && rate.status !== 'DRAFT' // TODO: Make this a more sophisticated check for child-rates
const handleAsLinkedRate = rate?.status && rate.status !== 'DRAFT' && rate.status !== 'UNLOCKED' // TODO: Make this a more sophisticated check for child-rates
const rateRev = handleAsLinkedRate ? rate?.revisions[0] : rate?.draftRevision
const rateForm = rateRev?.formData
return {
Expand Down

0 comments on commit adc5425

Please sign in to comment.