Merge branch 'release/v15.9.3'
This commit is contained in:
@@ -2430,18 +2430,21 @@ class PlannedSession(models.Model):
|
||||
|
||||
# interval string
|
||||
if self.interval_string:
|
||||
dct = trainingparser.parsetodict(self.interval_string)
|
||||
dct = [item for item in dct if item['value'] != 0]
|
||||
dct = trainingparser.tofitdict(dct)
|
||||
for step in dct['steps']:
|
||||
try:
|
||||
step['targetValue'] = int(step['targetValue'])
|
||||
step['targetValueLow'] = int(step['targetValueHigh'])
|
||||
step['targetValueHigh'] = int(step['targetValueLow'])
|
||||
try:
|
||||
dct = trainingparser.parsetodict(self.interval_string)
|
||||
dct = [item for item in dct if item['value'] != 0]
|
||||
dct = trainingparser.tofitdict(dct)
|
||||
for step in dct['steps']:
|
||||
try:
|
||||
step['targetValue'] = int(step['targetValue'])
|
||||
step['targetValueLow'] = int(step['targetValueHigh'])
|
||||
step['targetValueHigh'] = int(step['targetValueLow'])
|
||||
|
||||
except KeyError:
|
||||
pass
|
||||
self.steps = dct
|
||||
except KeyError:
|
||||
pass
|
||||
self.steps = dct
|
||||
except:
|
||||
pass
|
||||
|
||||
# sort units
|
||||
if self.sessionmode == 'distance':
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
236,326,plannedsessions_print_view,print view,TRUE,302,basic,200,403,basic,403,403,coach,200,403,FALSE,TRUE,FALSE,TRUE,TRUE,
|
||||
237,327,plannedsession_comment_view,comment on planned session,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
238,330,plannedsessions_icsemail_view,send ICS email,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,TRUE,FALSE,FALSE,FALSE,
|
||||
239,332,plannedsessions_view,View planned sessions,TRUE,302,basic,200,403,basic,403,403,coach,200,403,FALSE,TRUE,FALSE,TRUE,TRUE,
|
||||
239,332,plannedsessions_view,View planned sessions,TRUE,302,basic,200,200,basic,200,200,coach,200,403,FALSE,TRUE,FALSE,FALSE,FALSE,
|
||||
240,334,course_edit_view,Edit course,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
241,335,course_delete_view,Delete course,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
242,336,course_kmldownload_view,Kmldownload course,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
|
||||
|
@@ -1384,7 +1384,10 @@ from rowers.plannedsessions import cratiocolors,checkscores
|
||||
def plannedsessions_view(request,
|
||||
userid=0,startdatestring='',enddatestring=''):
|
||||
|
||||
r = getrequestplanrower(request,userid=userid)
|
||||
try:
|
||||
r = getrequestplanrower(request,userid=userid)
|
||||
except PermissionDenied:
|
||||
r = request.user.rower
|
||||
|
||||
if startdatestring:
|
||||
try:
|
||||
@@ -2373,7 +2376,9 @@ def plannedsession_view(request,id=0,userid=0):
|
||||
'sessionsport',
|
||||
'sessiontype',
|
||||
'sessionmode','criterium',
|
||||
'sessionvalue','sessionunit','comment',
|
||||
'sessionvalue','sessionunit',
|
||||
'approximate_distance','approximate_duration',
|
||||
'comment',
|
||||
],
|
||||
'workouts': ws,
|
||||
'active':'nav-plan',
|
||||
|
||||
Reference in New Issue
Block a user