better protection of private workouts
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user