Skip to content

Commit

Permalink
add more tests and errors for update and link
Browse files Browse the repository at this point in the history
  • Loading branch information
macrael committed Mar 7, 2024
1 parent 247af4c commit 18f3605
Show file tree
Hide file tree
Showing 4 changed files with 431 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,17 @@ function contractWithHistoryToDomainModel(

const draftPrismaRates = contractRev.draftRates

draftRates = draftPrismaRates.map((r) => ({
id: r.id,
createdAt: r.createdAt,
updatedAt: r.updatedAt,
status: getContractRateStatus(r.revisions),
stateCode: r.stateCode,
stateNumber: r.stateNumber,
revisions: [],
}))
draftRates = draftPrismaRates.map((r) => {
return {
id: r.id,
createdAt: r.createdAt,
updatedAt: r.updatedAt,
status: getContractRateStatus(r.revisions),
stateCode: r.stateCode,
stateNumber: r.stateNumber,
revisions: [],
}
})
// skip the rest of the processing
continue
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import type { ContractRevisionTableWithRates } from './prismaSubmittedContractHe
const includeDraftRates = {
revisions: {
include: includeRateFormData,
take: 1,
orderBy: {
createdAt: 'desc',
},
Expand Down
Loading

0 comments on commit 18f3605

Please sign in to comment.