fix: Increase Supabase query limit to fetch all historical stats

This commit is contained in:
haneulai 2026-01-27 16:45:59 +09:00
parent 3b9403b654
commit cfb8079809

View File

@ -76,8 +76,9 @@ async def get_plant_stats(
stats_query = stats_query.lte("date", today_str)
stats_query = stats_query.order("date", desc=False)
stats_result = stats_query.execute()
# Supabase 기본 limit이 1000이므로 충분히 늘려줌 (10년치 = 약 3650일)
stats_result = stats_query.limit(10000).execute()
# 데이터 맵핑 {날짜: 발전량}
data_map = {row["date"]: row["total_generation"] or 0 for row in stats_result.data}