v1.0.162: auto-classify backend — classify/grouping services, 7 new columns, /classify-batch, /api/groups, /apply-groups
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user