Skip to content

Commit 37168da

Browse files
authored
fix json decode (#3299)
1 parent effa6bd commit 37168da

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libs/libcommon/src/libcommon/viewer_utils/features.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,10 @@ def get_cell_value(
446446
json_path=json_path,
447447
)
448448
elif isinstance(fieldType, Json):
449-
return fieldType.decode_example(cell) if fieldType.decode else cell
449+
try:
450+
return fieldType.decode_example(cell)
451+
except (ValueError, TypeError):
452+
return cell
450453
elif isinstance(fieldType, list):
451454
if not isinstance(cell, list):
452455
raise TypeError("list cell must be a list.")

0 commit comments

Comments
 (0)