Private
Public Access
1
0

prevent users to use 0 as planned session value

This commit is contained in:
Sander Roosendaal
2018-12-07 08:56:38 +01:00
parent fcc74d0625
commit 6f4ba95337
3 changed files with 19 additions and 2 deletions

View File

@@ -15583,6 +15583,9 @@ def plannedsession_edit_view(request,id=0,userid=0):
if ps.manager != request.user:
raise PermissionDenied("You are not allowed to edit this planned session")
if ps.sessiontype in ['race','indoorrace']:
raise PermissionDenied("You are not allowed to edit this planned session because it is a race")
if ps.team.all() or len(ps.rower.all())>1:
url = reverse(plannedsession_teamedit_view,