Private
Public Access
1
0

no future dates in activity chart

This commit is contained in:
Sander Roosendaal
2017-07-29 13:14:18 +02:00
parent 4db523b396
commit 5a5c3508ea
2 changed files with 23 additions and 5 deletions

View File

@@ -235,8 +235,17 @@ def interactive_activitychart(workouts,startdate,enddate):
durations.append(du)
types.append(w.workouttype)
d = startdate
try:
d = utc.localize(startdate)
except ValueError:
d = startdate
try:
enddate = utc.localize(enddate)
except ValueError:
pass
while d<=enddate:
dates.append(d.strftime('%m/%d'))
durations.append(0)