v1.0.162: auto-classify backend — classify/grouping services, 7 new columns, /classify-batch, /api/groups, /apply-groups

This commit is contained in:
2026-06-24 08:22:21 +04:00
parent 740f75a791
commit 7a96f5b95b
8 changed files with 372 additions and 6 deletions
+3 -1
View File
@@ -31,6 +31,8 @@ def handle_upload(rfile, content_type, content_length):
if "contract_id" in fs:
contract_id = fs.getfirst("contract_id", "")
batch_id = fs.getfirst("batch_id", None) if "batch_id" in fs else None
if not filename or not file_data:
return {"ok": False, "error": "no file in request"}
@@ -40,7 +42,7 @@ def handle_upload(rfile, content_type, content_length):
if contract_id:
supplements.delete_by_document(contract_id, filename)
doc = documents.insert(filename, mime, b64)
doc = documents.insert(filename, mime, b64, batch_id=batch_id)
if not contract_id:
from datetime import datetime