P
Prisma2mo ago
Mickaël

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.
1 Reply
Mickaël
Mickaël2mo ago
The thing is that it give me this error but in the db it update the field but I have a extension to update the field in the document model and the extension don't work so I think it's because of it
Want results from more Discord servers?
Add your server