Private
Public Access
1
0

join works

This commit is contained in:
Sander Roosendaal
2017-11-23 17:19:17 +01:00
parent fbdf017676
commit b1c642c968
4 changed files with 26 additions and 8 deletions

View File

@@ -188,8 +188,11 @@ def join_workouts(r,ids,title='Joined Workout',
makeprivate = False
startdatetime = timezone.now()
if setprivate:
if setprivate == True and makeprivate == False:
makeprivate = True
elif setprivate == False and makeprivate == True:
makeprivate = False
# reorder in chronological order
ws = Workout.objects.filter(id__in=ids).order_by("date", "starttime")
@@ -864,6 +867,7 @@ def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
pytz.timezone(timezone_str)
).strftime('%H:%M:%S')
if makeprivate:
privacy = 'hidden'
else: