From b5d35f57fc185b1c061edc0c12ce57f0902d005a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Wed, 24 Jun 2026 15:21:17 +0400 Subject: [PATCH] =?UTF-8?q?v1.0.174:=20reset/list=5Fpending=20=D0=B1=D0=B5?= =?UTF-8?q?=D0=B7=20=D1=84=D0=B8=D0=BB=D1=8C=D1=82=D1=80=D0=B0=20status=3D?= =?UTF-8?q?parsed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/db/documents.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/db/documents.py b/deploy/db/documents.py index cf2ccdb..e6ec1a6 100644 --- a/deploy/db/documents.py +++ b/deploy/db/documents.py @@ -56,7 +56,7 @@ def set_classify_failed(doc_id, error): def list_pending(batch_id): """Documents waiting for classification.""" return query( - "SELECT id, filename, elements_json FROM documents WHERE batch_id=%s AND classify_status='pending' AND status='parsed'", + "SELECT id, filename, elements_json FROM documents WHERE batch_id=%s AND classify_status='pending'", (batch_id,), ) @@ -64,7 +64,7 @@ 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'", + "UPDATE documents SET classify_status='pending', error_message=NULL WHERE batch_id=%s", (batch_id,), )