full-stack-web-development icon indicating copy to clipboard operation
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)

Open alocoda opened this issue 3 years ago • 0 comments

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

alocoda avatar Jan 23 '22 07:01 alocoda