saves session result?
This commit is contained in:
@@ -2131,6 +2131,8 @@ regularsessiontypechoices = (
|
||||
('test','Mandatory Test'),
|
||||
('cycletarget','Total for a time period'),
|
||||
('coursetest','OTW test over a course'),
|
||||
('fastest_distance','Finds fastest time over a given distance'),
|
||||
('fastest_time','Finds largest distance rowed over a given time'),
|
||||
)
|
||||
|
||||
# model for Planned Session (Workout, Challenge, Test)
|
||||
@@ -2143,6 +2145,8 @@ class PlannedSession(models.Model):
|
||||
('test','Mandatory Test'),
|
||||
('cycletarget','Total for a time period'),
|
||||
('coursetest','OTW test over a course'),
|
||||
('fastest_distance','Finds fastest time over a given distance'),
|
||||
('fastest_time','Finds largest distance rowed over a given time'),
|
||||
('race','Virtual challenge'),
|
||||
('indoorrace','Indoor Virtual challenge'),
|
||||
)
|
||||
@@ -2153,6 +2157,8 @@ class PlannedSession(models.Model):
|
||||
('test','Mandatory Test'),
|
||||
('cycletarget','Total for a time period'),
|
||||
('coursetest','OTW test over a course'),
|
||||
('fastest_distance','Finds fastest time over a given distance'),
|
||||
('fastest_time','Finds largest distance rowed over a given time'),
|
||||
)
|
||||
|
||||
sessionmodechoices = (
|
||||
@@ -2274,7 +2280,7 @@ class PlannedSession(models.Model):
|
||||
else:
|
||||
self.sessionunit = 'None'
|
||||
|
||||
if self.sessiontype == 'test' or self.sessiontype == 'indoorrace':
|
||||
if self.sessiontype in ['test','indoorrace','fastest_distance','fastest_time']:
|
||||
if self.sessionmode not in ['distance','time']:
|
||||
if self.sessionvalue < 100:
|
||||
self.sessionmode = 'time'
|
||||
@@ -2832,6 +2838,8 @@ class PlannedSessionFormSmall(ModelForm):
|
||||
('test','Mandatory Test'),
|
||||
('cycletarget','Total for a time period'),
|
||||
('coursetest','OTW test over a course'),
|
||||
('fastest_distance','Finds fastest time over a given distance'),
|
||||
('fastest_time','Finds largest distance rowed over a given time'),
|
||||
)
|
||||
|
||||
class Meta:
|
||||
|
||||
Reference in New Issue
Block a user