From cd141ff8d213dd315d7d25bd93cd7a7b6dd25dce Mon Sep 17 00:00:00 2001 From: jkomyno <12381818+jkomyno@users.noreply.github.com> Date: Mon, 13 Jan 2025 13:09:41 +0100 Subject: [PATCH] fix(query-core): enable null_serialization_error --- query-engine/core/src/response_ir/internal.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/query-engine/core/src/response_ir/internal.rs b/query-engine/core/src/response_ir/internal.rs index 2291e698cb7..673624766d6 100644 --- a/query-engine/core/src/response_ir/internal.rs +++ b/query-engine/core/src/response_ir/internal.rs @@ -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 { + } else if items.is_empty() && !opt { Err(CoreError::null_serialization_error(&name)) } else { Ok((parent, Item::Ref(ItemRef::new(items.pop().unwrap()))))