fix(cafe24): 진열/판매 변경 후 예전 상태로 보이는 읽기 지연 보정
- overlay_recent_write: updated_date 가 같아도 값이 다르면 지연으로 판정 (진열/판매만 바꾼 PUT 은 updated_date 를 올리지 않을 수 있음) - 상품 목록에도 최근 쓰기 스냅샷 보정 적용(overlay_product_rows) — 목록·필터가 예전 값으로 보이고 캐시가 예전 값으로 덮이던 문제 - 예약 폼 현재 상태 미리보기도 load_product 로 보정 - PUT 응답에 product_no 가 없어도 스냅샷 저장 - 회귀 테스트 추가 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -232,6 +232,9 @@ def resolve_effective(
|
||||
# ════════════════════════════════════════════════════════════
|
||||
def remember_product_write(st: Any, product_no: int, updated: dict[str, Any]) -> tuple[dict[str, Any], str]:
|
||||
"""PUT 응답(상품 dict)을 캐시·스냅샷에 남긴다. (정규화된 상품 행, 기록 오류 문자열)."""
|
||||
if updated and not updated.get("product_no"):
|
||||
# 응답에 상품번호가 빠져도 기록은 남긴다 — 안 남기면 지연 보정이 안 돼 예전 값이 보인다.
|
||||
updated = {**updated, "product_no": int(product_no)}
|
||||
info = products.normalize_product(updated) if updated else {}
|
||||
if not info.get("product_no"):
|
||||
return info, ""
|
||||
|
||||
Reference in New Issue
Block a user