refactor(realestate-db): tuple param + status column in unnotified query
- mark_matches_notified: pass tuple(match_ids) to conn.execute for consistency - get_unnotified_matches: add a.status to SELECT so notifier/formatter can skip stale '완료' matches - add regression test: test_get_unnotified_matches_includes_status Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -714,7 +714,7 @@ def get_unnotified_matches(min_score: int) -> List[Dict[str, Any]]:
|
||||
with _conn() as conn:
|
||||
rows = conn.execute("""
|
||||
SELECT m.id, m.announcement_id, m.match_score, m.match_reasons, m.eligible_types,
|
||||
a.house_nm, a.region_name, a.district, a.address,
|
||||
a.house_nm, a.region_name, a.district, a.address, a.status,
|
||||
a.receipt_start, a.receipt_end, a.winner_date,
|
||||
a.house_secd, a.is_speculative_area, a.is_price_cap, a.pblanc_url
|
||||
FROM match_results m
|
||||
@@ -741,7 +741,7 @@ def mark_matches_notified(match_ids: List[int]) -> None:
|
||||
conn.execute(
|
||||
f"UPDATE match_results SET notified_at = strftime('%Y-%m-%dT%H:%M:%fZ','now') "
|
||||
f"WHERE id IN ({placeholders})",
|
||||
match_ids,
|
||||
tuple(match_ids),
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user