fix: mark empty world cup calendar dates
This commit is contained in:
@@ -3991,6 +3991,29 @@ async def _build_daily_card_calendar_payload(start_date: str = '2026-06-11', end
|
||||
dates: list[dict[str, Any]] = []
|
||||
for target_date in calendar_days:
|
||||
target_day = _to_date(target_date)
|
||||
if match_counts[target_date] <= 0:
|
||||
dates.append(
|
||||
{
|
||||
'date': target_date,
|
||||
'match_count': 0,
|
||||
'matched_matches': 0,
|
||||
'recommendation_count': 0,
|
||||
'live_count': 0,
|
||||
'watch_count': 0,
|
||||
'safe_single_count': 0,
|
||||
'high_risk_single_count': 0,
|
||||
'safe_parlay_count': 0,
|
||||
'sgp_lottery_count': 0,
|
||||
'total_amount_twd': 0,
|
||||
'market_data_status': 'no_matches',
|
||||
'snapshot_status': 'not_applicable',
|
||||
'snapshot_item_count': 0,
|
||||
'snapshot_preserved_count': 0,
|
||||
'summary': '台北時間當日沒有世界盃賽事;保留此日期是為了讓賽程從開踢日起完整呈現。',
|
||||
}
|
||||
)
|
||||
continue
|
||||
|
||||
snapshot_payload = await _read_daily_recommendation_snapshot_payload(target_date)
|
||||
if target_day <= _taipei_today_date() and snapshot_payload and _all_daily_card_items(snapshot_payload):
|
||||
card = snapshot_payload
|
||||
|
||||
Reference in New Issue
Block a user