fix(validation): remove non-existent find_new_orders call
Replace broken asyncio.to_thread call with len(importable) which already represents orders ready to process. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
import asyncio
|
|
||||||
import csv
|
import csv
|
||||||
import io
|
import io
|
||||||
import json
|
import json
|
||||||
@@ -25,10 +24,6 @@ async def scan_and_validate():
|
|||||||
result = validation_service.validate_skus(all_skus)
|
result = validation_service.validate_skus(all_skus)
|
||||||
importable, skipped = validation_service.classify_orders(orders, result)
|
importable, skipped = validation_service.classify_orders(orders, result)
|
||||||
|
|
||||||
# Find new orders (not yet in Oracle)
|
|
||||||
all_order_numbers = [o.number for o in orders]
|
|
||||||
new_orders = await asyncio.to_thread(validation_service.find_new_orders, all_order_numbers)
|
|
||||||
|
|
||||||
# Build SKU context from skipped orders and track missing SKUs
|
# Build SKU context from skipped orders and track missing SKUs
|
||||||
sku_context = {} # sku -> {order_numbers: [], customers: []}
|
sku_context = {} # sku -> {order_numbers: [], customers: []}
|
||||||
for order, missing_list in skipped:
|
for order, missing_list in skipped:
|
||||||
@@ -73,7 +68,7 @@ async def scan_and_validate():
|
|||||||
"total_skus": len(all_skus),
|
"total_skus": len(all_skus),
|
||||||
"importable": len(importable),
|
"importable": len(importable),
|
||||||
"skipped": len(skipped),
|
"skipped": len(skipped),
|
||||||
"new_orders": len(new_orders),
|
"new_orders": len(importable),
|
||||||
# Fields consumed by the rescan progress banner in missing_skus.html
|
# Fields consumed by the rescan progress banner in missing_skus.html
|
||||||
"total_skus_scanned": total_skus_scanned,
|
"total_skus_scanned": total_skus_scanned,
|
||||||
"new_missing": new_missing_count,
|
"new_missing": new_missing_count,
|
||||||
|
|||||||
Reference in New Issue
Block a user