some improvements in team sessions
This commit is contained in:
@@ -948,6 +948,19 @@ class PlannedSessionTeamForm(forms.Form):
|
||||
|
||||
self.fields['team'].queryset = Team.objects.filter(manager=user)
|
||||
|
||||
def clean(self):
|
||||
if any(self.errors):
|
||||
return
|
||||
|
||||
cd = self.cleaned_data
|
||||
print cd['team'],'aap'
|
||||
if not cd['team']:
|
||||
raise forms.ValidationError(
|
||||
'You must select at least one team'
|
||||
)
|
||||
|
||||
return cd
|
||||
|
||||
|
||||
class PlannedSessionTeamMemberForm(forms.Form):
|
||||
members = forms.ModelMultipleChoiceField(
|
||||
|
||||
Reference in New Issue
Block a user