Private
Public Access
1
0

better protection of private workouts

This commit is contained in:
Sander Roosendaal
2018-10-29 11:08:49 +01:00
parent a10cba74f6
commit 0a469e81fe
3 changed files with 55 additions and 33 deletions

View File

@@ -247,19 +247,18 @@ def interactive_activitychart(workouts,startdate,enddate,stack='type'):
durations = []
for w in workouts:
if w.privacy == 'visible':
dd = w.date.strftime('%m/%d')
dd2 = w.date.strftime('%Y/%m/%d')
du = w.duration.hour*60+w.duration.minute
dates.append(dd)
dates_sorting.append(dd2)
durations.append(du)
types.append(w.workouttype)
try:
rowers.append(w.user.user.first_name[0]+w.user.user.last_name[0])
except IndexError:
rowers.append(str(w.user))
dd = w.date.strftime('%m/%d')
dd2 = w.date.strftime('%Y/%m/%d')
du = w.duration.hour*60+w.duration.minute
dates.append(dd)
dates_sorting.append(dd2)
durations.append(du)
types.append(w.workouttype)
try:
rowers.append(w.user.user.first_name[0]+w.user.user.last_name[0])
except IndexError:
rowers.append(str(w.user))
try:
d = utc.localize(startdate)