v1.0.174: classify_batch сбрасывает статус на pending — работает после удаления файлов

This commit is contained in:
2026-06-24 15:17:45 +04:00
parent 592041ab89
commit e939c320cc
2 changed files with 12 additions and 2 deletions
+8
View File
@@ -61,6 +61,14 @@ def list_pending(batch_id):
)
def reset_classify_status(batch_id):
"""Сбросить classify_status на 'pending' для всех документов батча."""
return execute(
"UPDATE documents SET classify_status='pending', error_message=NULL WHERE batch_id=%s AND status='parsed'",
(batch_id,),
)
def list_by_batch(batch_id):
"""All documents in a batch with classification fields."""
return query(