fixed rights
This commit is contained in:
@@ -474,6 +474,17 @@ def get_workout(id):
|
||||
|
||||
return w
|
||||
|
||||
def get_workoutuser(id,request):
|
||||
try:
|
||||
id = encoder.decode_hex(id)
|
||||
w = Workout.objects.get(id=id)
|
||||
except Workout.DoesNotExist:
|
||||
raise Http404("Workout doesn't exist")
|
||||
|
||||
if not is_workout_user(request.user,w):
|
||||
raise PermissionDenied
|
||||
|
||||
return w
|
||||
|
||||
def getvalue(data):
|
||||
perc = 0
|
||||
|
||||
Reference in New Issue
Block a user