Skip to content

Commit 46bb66a

Browse files
committed
Remove comment and update user message
1 parent a6ec7b1 commit 46bb66a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

studygroups/views/facilitate.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff 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.'))

0 commit comments

Comments
 (0)