Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create throws assertion error #10

Closed
jacobaraujo7 opened this issue Sep 4, 2022 · 0 comments · Fixed by #12
Closed

Create throws assertion error #10

jacobaraujo7 opened this issue Sep 4, 2022 · 0 comments · Fixed by #12
Labels
bug Something isn't working

Comments

@jacobaraujo7
Copy link
Contributor

jacobaraujo7 commented Sep 4, 2022

Following the creation example, I run into this problem:

image

Apparently the 'data' property is waiting for a PrismaUnion<ClientCreateInput, ClientUncheckedCreateInput>.
I tried to use PrismaUnion.zero, but I end up falling for this assertion.

image

This assert make no sense to me, because if use the factory zero or one throws a assertion error.
image

SUGGESTION: zero != null || one != null

@medz medz linked a pull request Sep 5, 2022 that will close this issue
@medz medz added the bug Something isn't working label Sep 5, 2022
@medz medz closed this as completed in #12 Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants