From 042d5f8574dea07a7571c4d5bd0ee005487520e0 Mon Sep 17 00:00:00 2001 From: king Date: Tue, 1 Sep 2026 15:05:36 +0900 Subject: [PATCH] =?UTF-8?q?fix(cupang):=20=EC=8B=9C=ED=8A=B8=20=EA=B8=B0?= =?UTF-8?q?=EB=A1=9D=20=EA=B2=B0=EA=B3=BC=EB=A5=BC=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=C2=B7=ED=99=94=EB=A9=B4=EC=97=90=20=ED=95=AD=EC=83=81=20?= =?UTF-8?q?=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 미설정/건너뜀도 사유를 보여준다(이전엔 조용히 넘어가 원인 파악이 어려웠음). Co-Authored-By: Claude Opus 5 --- app/modules/cupang/router.py | 5 +++++ app/modules/cupang/templates/cupang/box_calc.html | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/modules/cupang/router.py b/app/modules/cupang/router.py index 38f6c5b..47f6047 100644 --- a/app/modules/cupang/router.py +++ b/app/modules/cupang/router.py @@ -1435,6 +1435,11 @@ async def box_calc_confirm( # 구글 스프레드시트에 출고일 시트 기록(설정돼 있을 때만). sheet = _push_to_google_sheet(store, ship_date) + print( # noqa: T201 - 컨테이너 로그로 확인용(비밀값 없음) + f"[cupang] sheet push date={ship_date} ok={sheet.get('ok')} " + f"skipped={sheet.get('skipped')} reason={sheet.get('reason', '')}", + flush=True, + ) return JSONResponse({"created": created, "ship_date": ship_date, "sheet": sheet}) diff --git a/app/modules/cupang/templates/cupang/box_calc.html b/app/modules/cupang/templates/cupang/box_calc.html index 9326713..0687e07 100644 --- a/app/modules/cupang/templates/cupang/box_calc.html +++ b/app/modules/cupang/templates/cupang/box_calc.html @@ -1333,8 +1333,9 @@ window.location.href = "/cupang/export.xlsx?date=" + encodeURIComponent(d); // 구글 시트 기록 결과 (설정돼 있을 때만 동작) var sh = (data && data.sheet) || {}; - var sheetNote = sh.ok ? "구글 시트 " + (sh.title || "") + " 기록 완료" - : (sh.skipped ? "" : "구글 시트 기록 실패 — " + (sh.reason || "")); + var sheetNote = sh.ok + ? "구글 시트 " + (sh.title || "") + " 기록 완료" + : "구글 시트 기록 안 됨 — " + (sh.reason || "사유 불명"); // 업로드한 출고일이 여러 개면 남은 날짜 작업을 이어서 한다. var idx = dateOrder.indexOf(activeDate); if (idx >= 0 && dateOrder.length > 1) {