diff --git a/api/app/routers/validation.py b/api/app/routers/validation.py index 1964b98..bc9622a 100644 --- a/api/app/routers/validation.py +++ b/api/app/routers/validation.py @@ -1,4 +1,3 @@ -import asyncio import csv import io import json @@ -25,10 +24,6 @@ async def scan_and_validate(): result = validation_service.validate_skus(all_skus) 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 sku_context = {} # sku -> {order_numbers: [], customers: []} for order, missing_list in skipped: @@ -73,7 +68,7 @@ async def scan_and_validate(): "total_skus": len(all_skus), "importable": len(importable), "skipped": len(skipped), - "new_orders": len(new_orders), + "new_orders": len(importable), # Fields consumed by the rescan progress banner in missing_skus.html "total_skus_scanned": total_skus_scanned, "new_missing": new_missing_count,