fix: cleanup

This commit is contained in:
David Nguyen
2025-10-13 16:02:22 +11:00
parent 6f70548bb5
commit 50572435ad
12 changed files with 53 additions and 35 deletions

View File

@ -88,7 +88,7 @@ export const createEnvelopeFields = async ({
// The item to attach the fields to MUST belong to the document.
if (
field.envelopeItemId &&
!envelope.envelopeItems.find((envelopeItem) => envelopeItem.id === field.envelopeItemId) // Todo: Migration test this
!envelope.envelopeItems.find((envelopeItem) => envelopeItem.id === field.envelopeItemId)
) {
throw new AppError(AppErrorCode.INVALID_REQUEST, {
message: 'Item to attach fields to must belong to the document',