mirror of
https://github.com/documenso/documenso.git
synced 2025-11-20 03:32:14 +10:00
chore: allow duplicate recipient in templates
This commit is contained in:
@ -22,8 +22,8 @@ export type SetFieldsForTemplateOptions = {
|
||||
fields: {
|
||||
id?: number | null;
|
||||
type: FieldType;
|
||||
signerEmail: string;
|
||||
recipientId: number;
|
||||
signerEmail: string;
|
||||
pageNumber: number;
|
||||
pageX: number;
|
||||
pageY: number;
|
||||
@ -181,10 +181,8 @@ export const setFieldsForTemplate = async ({
|
||||
},
|
||||
recipient: {
|
||||
connect: {
|
||||
templateId_email: {
|
||||
templateId,
|
||||
email: field.signerEmail.toLowerCase(),
|
||||
},
|
||||
templateId,
|
||||
id: field.recipientId,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@ -141,10 +141,8 @@ export const createDocumentFromTemplateLegacy = async ({
|
||||
|
||||
return await prisma.recipient.upsert({
|
||||
where: {
|
||||
documentId_email: {
|
||||
documentId: document.id,
|
||||
email: existingRecipient?.email ?? recipient.email,
|
||||
},
|
||||
documentId: document.id,
|
||||
id: existingRecipient?.id,
|
||||
},
|
||||
update: {
|
||||
name: recipient.name,
|
||||
|
||||
Reference in New Issue
Block a user