feat(retry): allow retry for MALFORMED orders
MALFORMED is now a valid retry source alongside ERROR / SKIPPED / DELETED_IN_ROA. The next sync will re-run validate_structural and either reclassify or keep the MALFORMED tag — either way, operators get the same "Retry" button they have for other failure paths without needing a separate UI affordance. 278 unit + 33 e2e green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -159,8 +159,10 @@ async def retry_single_order(order_number: str, app_settings: dict) -> dict:
|
||||
|
||||
order_data = detail["order"]
|
||||
status = order_data.get("status", "")
|
||||
if status not in (OrderStatus.ERROR.value, OrderStatus.SKIPPED.value, OrderStatus.DELETED_IN_ROA.value):
|
||||
return {"success": False, "message": f"Retry permis doar pentru ERROR/SKIPPED/DELETED_IN_ROA (status actual: {status})"}
|
||||
if status not in (OrderStatus.ERROR.value, OrderStatus.SKIPPED.value,
|
||||
OrderStatus.DELETED_IN_ROA.value, OrderStatus.MALFORMED.value):
|
||||
return {"success": False,
|
||||
"message": f"Retry permis doar pentru ERROR/SKIPPED/DELETED_IN_ROA/MALFORMED (status actual: {status})"}
|
||||
|
||||
order_date_str = order_data.get("order_date", "")
|
||||
customer_name = order_data.get("customer_name", "")
|
||||
|
||||
Reference in New Issue
Block a user