changing can_coahc
This commit is contained in:
@@ -225,12 +225,10 @@ def rower_teams_view(request):
|
||||
|
||||
potentialcoaches = [t.manager for t in memberteams if t.manager not in coaches and 'coach' in t.manager.rower.rowerplan]
|
||||
offercoaches = [
|
||||
r.user for r in Rower.objects.filter(
|
||||
offercoaching=True,rowerplan__in='coach').exclude(user=request.user)
|
||||
r.user for r in Rower.objects.all().exclude(user=request.user) if r.can_coach()
|
||||
]
|
||||
potentialcoaches = list(set(potentialcoaches+offercoaches))
|
||||
potentialcoaches = [c for c in potentialcoaches if c.rower not in invitedcoaches+coaches]
|
||||
potentialcoaches = [c for c in potentialcoaches if teams.get_coach_club_size(c.rower)<c.rower.clubsize]
|
||||
|
||||
|
||||
coachees = teams.coach_getcoachees(request.user.rower)
|
||||
|
||||
@@ -252,7 +252,6 @@ def rower_favoritecharts_view(request,userid=0):
|
||||
r.usersmooth = staticchartform.cleaned_data.get('usersmooth')
|
||||
r.save()
|
||||
|
||||
print(request.POST)
|
||||
if request.method == 'POST' and 'save_data' in request.POST:
|
||||
datasettingsform = DataRowerForm(request.POST,instance=r)
|
||||
if datasettingsform.is_valid():
|
||||
|
||||
Reference in New Issue
Block a user