Fix order.page_config → page_config_id in checkout return
The page_config relationship was removed during DB split; use the page_config_id column and fetch page config via HTTP instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -254,12 +254,15 @@ def register(url_prefix: str) -> Blueprint:
|
||||
return await make_response(html)
|
||||
|
||||
# Resolve page/market slugs so product links render correctly
|
||||
if order.page_config:
|
||||
if order.page_config_id:
|
||||
from shared.infrastructure.data_client import fetch_data
|
||||
from shared.contracts.dtos import CalendarEntryDTO, TicketDTO, dto_from_dict
|
||||
raw_pc = await fetch_data("blog", "page-config-by-id",
|
||||
params={"id": order.page_config_id},
|
||||
required=False)
|
||||
post = await fetch_data("blog", "post-by-id",
|
||||
params={"id": order.page_config.container_id},
|
||||
required=False)
|
||||
params={"id": raw_pc["container_id"]},
|
||||
required=False) if raw_pc else None
|
||||
if post:
|
||||
g.page_slug = post["slug"]
|
||||
result = await g.s.execute(
|
||||
|
||||
Reference in New Issue
Block a user