Mickaël
PPrisma
•Created by Mickaël on 8/19/2024 in #help-and-questions
Error with method update: Urgent please
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.3 replies