From ce1014e6bc94d0841da98f6b02b9fc9f7ff9cc7f Mon Sep 17 00:00:00 2001 From: king Date: Sat, 30 May 2026 06:58:32 +0900 Subject: [PATCH] =?UTF-8?q?fix(cupang):=20=EC=B6=9C=EA=B3=A0=20=ED=88=B4?= =?UTF-8?q?=ED=8C=81=20500=20=EC=97=90=EB=9F=AC=20=E2=80=94=20s.items(dict?= =?UTF-8?q?=20=EB=A9=94=EC=84=9C=EB=93=9C=20=EC=B6=A9=EB=8F=8C)=20?= =?UTF-8?q?=E2=86=92=20tip=5Fitems?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Jinja 의 s.items 는 dict 키가 아닌 .items() 메서드를 반환해 tojson 실패. 컨텍스트 키를 tip_items 로 변경. Co-Authored-By: Claude Opus 4.8 --- app/modules/cupang/router.py | 2 +- app/modules/cupang/templates/cupang/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/modules/cupang/router.py b/app/modules/cupang/router.py index e40f905..b1b4137 100644 --- a/app/modules/cupang/router.py +++ b/app/modules/cupang/router.py @@ -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 []) diff --git a/app/modules/cupang/templates/cupang/index.html b/app/modules/cupang/templates/cupang/index.html index a51e949..1ed4065 100644 --- a/app/modules/cupang/templates/cupang/index.html +++ b/app/modules/cupang/templates/cupang/index.html @@ -66,7 +66,7 @@ {% for s in sel_shipments %}
  • + data-items='{{ s.tip_items | tojson }}'>
    {{ s.center_name_snapshot or '센터 미지정' }} {% set badge = 'erp-badge-neutral' %}