cleanup resolved missing skus

This commit is contained in:
Claude Agent
2026-03-25 22:29:33 +00:00
parent a659f3bafb
commit f2bf6805b4
2 changed files with 24 additions and 0 deletions

View File

@@ -410,6 +410,13 @@ async def run_sync(id_pol: int = None, id_sectie: int = None, run_id: str = None
customers=json.dumps(ctx.get("customers", [])) if ctx.get("customers") else None,
)
# Auto-resolve missing SKUs that now have mappings
resolved_skus = validation["mapped"] | validation["direct"]
if resolved_skus:
resolved_count = await sqlite_service.resolve_missing_skus_batch(resolved_skus)
if resolved_count:
_log_line(run_id, f"Auto-resolved {resolved_count} previously missing SKUs")
# Step 2d: Pre-validate prices for importable articles
if id_pol and (truly_importable or already_in_roa):
_update_progress("validation", "Validating prices...", 0, len(truly_importable))