Private
Public Access
1
0

tested functionality on test site

This commit is contained in:
Sander Roosendaal
2019-01-24 21:01:05 +01:00
parent 29e097359e
commit 2ec4419597
4 changed files with 13 additions and 9 deletions

View File

@@ -84,13 +84,13 @@ def processattachment(rower, fileobj, title, uploadoptions,testing=False):
make_new_workout_from_email(therower, filename, title,testing=testing)
]
if testing and workoutid[0]:
w = Workout.objects.get(id = workoutid[0])
w.startdatetime = timezone.now()
w.date = timezone.now().date()
w.save()
if 'raceid' in uploadoptions and workoutid[0]:
if 'raceid' in uploadoptions and workoutid[0] and rower.user.is_staff:
if testing and workoutid[0]:
w = Workout.objects.get(id = workoutid[0])
w.startdatetime = timezone.now()
w.date = timezone.now().date()
w.save()
try:
race = VirtualRace.objects.get(id=uploadoptions['raceid'])
if race.manager == rower.user: