diff --git a/app/routers/stats.py b/app/routers/stats.py index a2d7106..a09f646 100644 --- a/app/routers/stats.py +++ b/app/routers/stats.py @@ -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}