fix(07): add status field to _doc_to_dict + regression test

DocumentCard classification_failed badge requires doc.status from the
API list endpoint. _doc_to_dict was omitting the field; this fix adds
it and adds a regression test that would have caught the omission.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
curo1305andClaude Sonnet 4.6 committed 2026-06-05 09:30:03 +02:00
1 parent 3b11b9a596
commit 76ebc3e96e
2 files changed
+28

No files matched your search

+1
View File
@@ -61,6 +61,7 @@ def _doc_to_dict(doc: Document, topic_names: list) -> dict:
"topics": topic_names,
"created_at": doc.created_at.isoformat() if doc.created_at else None,
"classified_at": doc.updated_at.isoformat() if doc.status == "classified" else None,
"status": doc.status,
}