except the url one, the url one only works as expected when it's "true" but not when it's "false", the type is string and it's not a mandatory field
Some really basic notes:
- undefined in Prisma means that the filter is just not there, so it's not even applied
- null means an empty value for the record
file_id is of type Int (number), and url is of type string
where: {
file_id:
hasFile === "false"
? null
: { not: hasFile === "true" ? null : undefined },
url:
hasUrl === "false"
? null
: { not: hasUrl === "true" ? null : undefined },
isAccessible:
isAccessible === "false"
? false
: {
not: isAccessible === "true" ? false : undefined,
},
},
What's even more absurd, it works just fine in development environment but not in production (yes they are the same version and I rebuilt the Next.js output just to be sure...) I don't know how to even go on about debugging this
Обсуждают сегодня