From feaedb0721aa79b37a9f8c094970a0962c22c287 Mon Sep 17 00:00:00 2001 From: aq Date: Sat, 7 Dec 2024 21:21:09 +0400 Subject: [PATCH] fix: Wrap obj in Value::Object for ObjectToPrimitive flag --- .../baml-lib/jsonish/src/deserializer/coercer/coerce_literal.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/baml-lib/jsonish/src/deserializer/coercer/coerce_literal.rs b/engine/baml-lib/jsonish/src/deserializer/coercer/coerce_literal.rs index 9701692a2..ccda9ab3b 100644 --- a/engine/baml-lib/jsonish/src/deserializer/coercer/coerce_literal.rs +++ b/engine/baml-lib/jsonish/src/deserializer/coercer/coerce_literal.rs @@ -55,7 +55,7 @@ impl TypeCoercer for LiteralValue { match inner_value { jsonish::Value::Number(_) | jsonish::Value::Boolean(_) | jsonish::Value::String(_) => { let mut result = self.coerce(ctx, target, Some(inner_value))?; - result.add_flag(Flag::ObjectToPrimitive(obj.clone())); + result.add_flag(Flag::ObjectToPrimitive(jsonish::Value::Object(obj.clone()))); return Ok(result); } _ => {}