Private
Public Access
1
0

added freecoach to coach priviliges

This commit is contained in:
Sander Roosendaal
2019-05-15 15:40:51 +02:00
parent d9a5ac2c06
commit 0f8a9f285b
12 changed files with 50 additions and 18 deletions

View File

@@ -3,6 +3,8 @@ from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
# All the data preparation, data cleaning and data mangling should
# be defined here
from __future__ import unicode_literals, absolute_import
@@ -28,6 +30,7 @@ from pandas import DataFrame, Series
from django.utils import timezone
from django.utils.timezone import get_current_timezone
from django_mailbox.models import Message,Mailbox,MessageAttachment
from django.core.exceptions import ValidationError
from time import strftime
import arrow
@@ -1100,8 +1103,11 @@ def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
try:
w.save()
except ValidationError:
w.startdatetime = timezone.now()
w.save()
try:
w.startdatetime = timezone.now()
w.save()
except ValidationError:
return (0,'Unable to create your workout')
if privacy == 'visible':
ts = Team.objects.filter(rower=r)