Merge tag 'v1.21' into develop
fix - compare chart now checks if id exists
This commit is contained in:
@@ -3274,6 +3274,9 @@ def workout_comparison_view2(request,id1=0,id2=0,xparam='distance',
|
|||||||
result = request.user.is_authenticated() and ispromember(request.user)
|
result = request.user.is_authenticated() and ispromember(request.user)
|
||||||
if result:
|
if result:
|
||||||
promember=1
|
promember=1
|
||||||
|
|
||||||
|
if not Workout.objects.filter(id=id1).exists() or not Workout.objects.filter(id=id2).exists():
|
||||||
|
raise Http404("Workout doesn't exist")
|
||||||
|
|
||||||
# create interactive plot
|
# create interactive plot
|
||||||
res = interactive_comparison_chart(id1,id2,xparam=xparam,yparam=yparam,
|
res = interactive_comparison_chart(id1,id2,xparam=xparam,yparam=yparam,
|
||||||
|
|||||||
Reference in New Issue
Block a user