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:
@@ -26,7 +26,7 @@ from app.integrations.cafe24 import Cafe24Error, build_cafe24_api, load_config,
|
||||
|
||||
from . import store, writes
|
||||
from .common import base_ctx, guard
|
||||
from .routes_products import _no_store
|
||||
from .routes_products import _no_store, load_product
|
||||
|
||||
logger = logging.getLogger("cafe24.schedules")
|
||||
|
||||
@@ -187,7 +187,7 @@ def schedule_current_flags(request: Request, product_no: int) -> dict:
|
||||
st, _user = require_store(request)
|
||||
api = build_cafe24_api(st)
|
||||
try:
|
||||
raw = products.get_product(api.client, product_no)
|
||||
raw, _ = load_product(st, api, product_no) # 방금 바꾼 진열/판매가 지연으로 예전 값이 되지 않게
|
||||
except Cafe24Error as exc:
|
||||
return {"product_no": product_no, "error": str(exc)}
|
||||
normalized = products.normalize_product(raw)
|
||||
|
||||
Reference in New Issue
Block a user