fix(재료): 단위 거름에서 규격 조건 풀어 재시도 · 환산 필요 재료 목록
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1MKKZKpUHTPKb513FneU8
This commit is contained in:
@@ -96,7 +96,11 @@ def 고르기(row: dict, market: list[dict]) -> tuple[dict | None, str]:
|
||||
cond = {"구분": sub, "상세구분": detail, **대표}
|
||||
if want and any(all(w in mm.plain_spec(r.get("규격")) for w in want) for r in hits):
|
||||
cond = {"구분": sub, "상세구분": detail, "규격": row["규격"], **대표}
|
||||
hits = [r for r in hits if all(w in mm.plain_spec(r.get("규격")) for w in want)]
|
||||
narrow = [r for r in hits if all(w in mm.plain_spec(r.get("규격")) for w in want)]
|
||||
got = _단위(row, cond, narrow, market)
|
||||
if got[0]:
|
||||
return got
|
||||
cond = {k: v for k, v in cond.items() if k != "규격"} # 규격까지 좁히면 단위 맞는 줄이 없음 — 규격 없이 다시
|
||||
return _단위(row, cond, hits, market)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user