Skip to content

Commit 507d55e

Browse files
committed
fix: tags check
Signed-off-by: samiuc <[email protected]>
1 parent 7eb9e85 commit 507d55e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docling_eval/datamodels/dataset_record.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@ def validate_record_dict(cls, data: dict):
274274
img_buffer.seek(0)
275275
data[gt_binary] = DocumentStream(name="image.png", stream=img_buffer)
276276

277-
# Backward compatibility: ensure tags field exists for old datasets
277+
# Backward compatibility: ensure tags field exists for old datasets and is not None
278278
tags_alias = cls.get_field_alias("tags")
279-
if tags_alias not in data:
279+
if tags_alias not in data or data[tags_alias] is None:
280280
data[tags_alias] = []
281281

282282
return data

0 commit comments

Comments
 (0)