We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aaf17fe commit 235b2cdCopy full SHA for 235b2cd
docling_core/types/doc/document.py
@@ -311,6 +311,8 @@ class CCSDocument(
311
@classmethod
312
def from_dict(cls, data):
313
"""Validates and fixes the input data."""
314
+ if not isinstance(data, dict):
315
+ return data
316
description_collection = data["description"].get("collection")
317
if not description_collection:
318
data["description"].setdefault("collection", {})
@@ -386,6 +388,8 @@ class ExportedCCSDocument(
386
388
387
389
390
"""Fix ref in main-text."""
391
392
393
if data.get("main-text"):
394
for item in data["main-text"]:
395
if ref := item.pop("__ref", None):
0 commit comments