fix: Increase Supabase query limit to fetch all historical stats
This commit is contained in:
parent
3b9403b654
commit
cfb8079809
|
|
@ -77,7 +77,8 @@ async def get_plant_stats(
|
|||
|
||||
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}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user