fix(cupang): 출고 툴팁 500 에러 — s.items(dict 메서드 충돌) → tip_items
Jinja 의 s.items 는 dict 키가 아닌 .items() 메서드를 반환해 tojson 실패. 컨텍스트 키를 tip_items 로 변경. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -140,7 +140,7 @@ async def index(request: Request) -> HTMLResponse:
|
||||
# 각 묶음에 품목 요약(제품명/수량) 첨부 — hover 툴팁용
|
||||
for s in sel_shipments:
|
||||
full = store.get_shipment(shipment_id=s["id"])
|
||||
s["items"] = [
|
||||
s["tip_items"] = [
|
||||
{"name": ln.get("product_name_snapshot") or ln.get("product_code"),
|
||||
"qty": ln.get("quantity", 0)}
|
||||
for ln in (full.get("lines") if full else [])
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
{% for s in sel_shipments %}
|
||||
<li class="cpg-list-item">
|
||||
<a href="/cupang/{{ s.id }}" class="cpg-list-link cpg-hover-item"
|
||||
data-items='{{ s.items | tojson }}'>
|
||||
data-items='{{ s.tip_items | tojson }}'>
|
||||
<div class="cpg-list-top">
|
||||
<strong>{{ s.center_name_snapshot or '센터 미지정' }}</strong>
|
||||
{% set badge = 'erp-badge-neutral' %}
|
||||
|
||||
Reference in New Issue
Block a user