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:
curo1305
2026-06-05 09:30:03 +02:00
co-authored by Claude Sonnet 4.6
parent 3b11b9a596
commit 76ebc3e96e
2 changed files with 28 additions and 0 deletions
+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,
}