Skip to content

Commit 26d5083

Browse files
fix: fields with null values serialized to empty dict (#636)
1 parent c793e04 commit 26d5083

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

src/uipath_langchain/runtime/_serialize.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ def serialize_output(output: Any) -> Any:
1414
Returns:
1515
Dict[str, Any]: Serialized output as dictionary
1616
"""
17-
if output is None:
18-
return {}
19-
2017
# Handle LangGraph types
2118
if isinstance(output, Overwrite):
2219
return serialize_output(output.value)

src/uipath_langchain/runtime/runtime.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,14 +456,14 @@ def _create_breakpoint_result(
456456
return UiPathBreakpointResult(
457457
breakpoint_node=breakpoint_node,
458458
breakpoint_type=breakpoint_type,
459-
current_state=serialize_output(graph_state.values),
459+
current_state=serialize_output(graph_state.values) or {},
460460
next_nodes=next_nodes,
461461
)
462462

463463
def _create_success_result(self, output: Any) -> UiPathRuntimeResult:
464464
"""Create result for successful completion."""
465465
return UiPathRuntimeResult(
466-
output=serialize_output(output),
466+
output=serialize_output(output) or {},
467467
status=UiPathRuntimeStatus.SUCCESSFUL,
468468
)
469469

0 commit comments

Comments
 (0)