Skip to content

Commit 61c0d14

Browse files
committed
fix small bug in _proccess_content_object
1 parent 8e7a18d commit 61c0d14

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/google/adk/workflow/utils/_rehydration_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,12 @@ def _process_content_object(event: Event) -> Any:
176176
text = ''.join(
177177
p.text for p in event.content.parts if p.text and not p.thought
178178
)
179+
text = text.strip()
180+
179181
if not text:
180182
return None
181183

182-
text = text.strip()
184+
183185
try:
184186
return json.loads(text)
185187
except (json.JSONDecodeError, ValueError):

0 commit comments

Comments
 (0)