Fix orders defpage endpoint references — app-level not blueprint
defpages mounted via auto_mount_pages() register endpoints without
blueprint prefix. Fix url_for("orders.defpage_*") → url_for("defpage_*").
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -42,7 +42,7 @@ def register() -> Blueprint:
|
||||
return await make_response("Order not found", 404)
|
||||
|
||||
if order.status == "paid":
|
||||
return redirect(url_for("orders.defpage_order_detail", order_id=order.id))
|
||||
return redirect(url_for("defpage_order_detail", order_id=order.id))
|
||||
|
||||
if order.sumup_hosted_url:
|
||||
return redirect(order.sumup_hosted_url)
|
||||
@@ -102,13 +102,13 @@ def register() -> Blueprint:
|
||||
return await make_response("Order not found", 404)
|
||||
|
||||
if not order.sumup_checkout_id:
|
||||
return redirect(url_for("orders.defpage_order_detail", order_id=order.id))
|
||||
return redirect(url_for("defpage_order_detail", order_id=order.id))
|
||||
|
||||
try:
|
||||
await check_sumup_status(g.s, order)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
return redirect(url_for("orders.defpage_order_detail", order_id=order.id))
|
||||
return redirect(url_for("defpage_order_detail", order_id=order.id))
|
||||
|
||||
return bp
|
||||
|
||||
@@ -88,7 +88,7 @@ def register(url_prefix: str) -> Blueprint:
|
||||
"total_formatted": f"{o.total_amount or 0:.2f}",
|
||||
})
|
||||
|
||||
detail_prefix = pfx + url_for("orders.defpage_order_detail", order_id=0).rsplit("0/", 1)[0]
|
||||
detail_prefix = pfx + url_for("defpage_order_detail", order_id=0).rsplit("0/", 1)[0]
|
||||
qs_fn = makeqs_factory()
|
||||
rows_url = pfx + url_for("orders.orders_rows")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user