making execution chart accessible
This commit is contained in:
@@ -2336,13 +2336,12 @@ def rower_trainingplan_execution_view(request,
|
||||
id=0,
|
||||
userid=0):
|
||||
|
||||
startdate = request.GET.get('startdate')
|
||||
enddate = request.GET.get('enddate')
|
||||
startdate,enddate = get_dates_timeperiod(request)
|
||||
|
||||
r = getrequestrower(request,userid=userid)
|
||||
|
||||
|
||||
if int(id):
|
||||
if int(id)>0:
|
||||
try:
|
||||
plan = TrainingPlan.objects.get(id=id)
|
||||
except TrainingPlan.DoesNotExist:
|
||||
@@ -2352,7 +2351,7 @@ def rower_trainingplan_execution_view(request,
|
||||
raise PermissionDenied("Access denied")
|
||||
|
||||
if not startdate or not enddate:
|
||||
if int(id):
|
||||
if int(id)>0:
|
||||
startdate = plan.startdate
|
||||
enddate = plan.enddate
|
||||
else:
|
||||
@@ -2361,7 +2360,7 @@ def rower_trainingplan_execution_view(request,
|
||||
startdate,enddate = get_dates_timeperiod(request)
|
||||
|
||||
|
||||
if int(id):
|
||||
if int(id)>0:
|
||||
data,message = get_execution_report(r,startdate,enddate,plan=plan)
|
||||
else:
|
||||
data,message = get_execution_report(r,startdate,enddate)
|
||||
|
||||
Reference in New Issue
Block a user