File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -649,7 +649,6 @@ def get_form(self):
649649 return form_class (queryset = queryset , ** kwargs )
650650
651651 def form_valid (self , form ):
652- # TODO take signup_limit into account
653652 study_group_id = self .kwargs .get ('study_group_id' )
654653 study_group = get_object_or_404 (StudyGroup , pk = study_group_id )
655654 applications = form .save (commit = False )
@@ -660,11 +659,10 @@ def form_valid(self, form):
660659
661660 if len (applications ) > available_signups :
662661 url = reverse ('studygroups_view_study_group' , args = (study_group_id ,))
663- messages .warning (self .request , 'No more available signups , please increase signup limit first' )
662+ messages .warning (self .request , 'Adding participants will exceed the signup limit , please increase the limit first. ' )
664663 return http .HttpResponseRedirect (url )
665664
666665
667-
668666 for application in applications :
669667 if application .email and Application .objects .active ().filter (email__iexact = application .email , study_group = study_group ).exists ():
670668 messages .warning (self .request , _ (f'A learner with the email address { application .email } has already signed up.' ))
You can’t perform that action at this time.
0 commit comments