#Error with method update: Urgent please

2 messages · Page 1 of 1 (latest)

sudden pollen
#

Hello I have an error that should not occur

Why I get this ?

Error updating sign:
Invalid prisma.document.update() invocation:

{
where: {
idDocument: undefined,
? AND?: DocumentWhereInput | DocumentWhereInput[],
? OR?: DocumentWhereInput[],
? NOT?: DocumentWhereInput | DocumentWhereInput[],
? name?: StringFilter | String,
? isSigned?: BoolFilter | Boolean,
? hash?: StringFilter | String,
? url?: StringFilter | String,
? createdAt?: DateTimeFilter | DateTime,
? idEnvelope?: StringFilter | String,
? envelope?: EnvelopeRelationFilter | EnvelopeWhereInput,
? signs?: SignListRelationFilter
},
data: {
isSigned: true
}
}

Argument where of type DocumentWhereUniqueInput needs at least one of idDocument arguments. Available options are marked with ?.

Here the code

const updatedSign = await prisma.sign.update({
where: {
idDocument_idSignatory: {
idDocument,
idSignatory: signatory.idSignatory,
},
},
data: {
hasSigned: true,
},
});

All the data is correct because I made a console.log before and it work perfectly.

rose ivyBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution