full-stack-web-development
full-stack-web-development copied to clipboard
Todo doesn't update at all both when marking done/ not done and when inputting text (with FIX)
Bug description
LOG:
STATUS 500
Invalid prisma.todo.update() invocation:
{ where: { uid: 'ckyqwgk7k0002h6tizorle0wb' }, data: { done: true, text: null ~~~~ } }
Argument text for data.text must not be null. Please use undefined instead.
Steps to reproduce
"prisma": "^3.8.1"
Expected behavior
Should update the element.
Example repository
https://github.com/gitpod-io/full-stack-web-development.git
when using prisma 3.8.1
Anything else?
FIX
text: data.text != null? data.text : undefined
If there's text then use data text, if not (marking done/ not done only), do not include text.
// https://www.prisma.io/docs/concepts/components/prisma-client/null-and-undefined