Skip to content

The Open Source DocuSign Alternative.

fix: fitler only unsigned documents

Ephraim Atta-Duncanfd4602faf8e5
diff --git a/packages/lib/server-only/document/complete-document-with-token.ts b/packages/lib/server-only/document/complete-document-with-token.ts
index e442f3061..8b1b4d576 100644
--- a/packages/lib/server-only/document/complete-document-with-token.ts
+++ b/packages/lib/server-only/document/complete-document-with-token.ts
@@ -73,6 +73,9 @@ export const completeDocumentWithToken = async ({
const numberOfRecipients = await prisma.recipient.count({
where: {
documentId: document.id,
+ signingStatus: {
+ not: SigningStatus.SIGNED,
+ },
},
});