Commit edb90b43 authored by Kristian Tan's avatar Kristian Tan

Limit graph entries to 7

parent a0edebe7
......@@ -86,7 +86,7 @@ def generate_graph_data():
# Create data for chart
# count = 0
records = DailyUsage.query.order_by(desc(DailyUsage.date)).limit(10).all()
records = DailyUsage.query.order_by(desc(DailyUsage.date)).limit(7).all()
print(records)
for record in records:
labels.append(date(record.date.year, record.date.month, record.date.day))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment