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:
2026-05-30 06:58:32 +09:00
parent 652e53c3e8
commit ce1014e6bc
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -140,7 +140,7 @@ async def index(request: Request) -> HTMLResponse:
# 각 묶음에 품목 요약(제품명/수량) 첨부 — hover 툴팁용 # 각 묶음에 품목 요약(제품명/수량) 첨부 — hover 툴팁용
for s in sel_shipments: for s in sel_shipments:
full = store.get_shipment(shipment_id=s["id"]) full = store.get_shipment(shipment_id=s["id"])
s["items"] = [ s["tip_items"] = [
{"name": ln.get("product_name_snapshot") or ln.get("product_code"), {"name": ln.get("product_name_snapshot") or ln.get("product_code"),
"qty": ln.get("quantity", 0)} "qty": ln.get("quantity", 0)}
for ln in (full.get("lines") if full else []) for ln in (full.get("lines") if full else [])
@@ -66,7 +66,7 @@
{% for s in sel_shipments %} {% for s in sel_shipments %}
<li class="cpg-list-item"> <li class="cpg-list-item">
<a href="/cupang/{{ s.id }}" class="cpg-list-link cpg-hover-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"> <div class="cpg-list-top">
<strong>{{ s.center_name_snapshot or '센터 미지정' }}</strong> <strong>{{ s.center_name_snapshot or '센터 미지정' }}</strong>
{% set badge = 'erp-badge-neutral' %} {% set badge = 'erp-badge-neutral' %}