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

fix(query-core): enable null_serialization_error #5120

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion query-engine/core/src/response_ir/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ fn finalize_objects(
Ok((parent, Item::Ref(ItemRef::new(first))))
} else if items.is_empty() && opt {
Ok((parent, Item::Ref(ItemRef::new(Item::Value(PrismaValue::Null)))))
} else if items.is_empty() && opt {
Comment on lines 297 to -299
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notice how these two conditions were identical, and hence the second one would never be conditionally chosen.

} else if items.is_empty() && !opt {
Err(CoreError::null_serialization_error(&name))
} else {
Ok((parent, Item::Ref(ItemRef::new(items.pop().unwrap()))))
Expand Down
Loading