fix(api): Fix variable truncation for list[File] value in output mapping (#26133)
This commit is contained in:
parent
2913d17fe2
commit
96a0b9991e
2 changed files with 16 additions and 0 deletions
|
|
@ -262,6 +262,14 @@ class VariableTruncator:
|
|||
target_length = self._array_element_limit
|
||||
|
||||
for i, item in enumerate(value):
|
||||
# Dirty fix:
|
||||
# The output of `Start` node may contain list of `File` elements,
|
||||
# causing `AssertionError` while invoking `_truncate_json_primitives`.
|
||||
#
|
||||
# This check ensures that `list[File]` are handled separately
|
||||
if isinstance(item, File):
|
||||
truncated_value.append(item)
|
||||
continue
|
||||
if i >= target_length:
|
||||
return _PartResult(truncated_value, used_size, True)
|
||||
if i > 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue