Commit e8da7ac0 authored by root's avatar root
Browse files

Add maximun participants number reached message.

parent cf126d56
......@@ -572,7 +572,8 @@ class Membership(models.Model):
def approve(self):
if self.group.max_participants:
assert len(self.group.approved_members) + 1 <= self.group.max_participants
assert len(self.group.approved_members) + 1 <= self.group.max_participants, \
'Maximum participant number has been reached.'
self.date_joined = datetime.now()
self.save()
quota_disturbed.send(sender=self, users=(self.person,))
......@@ -860,4 +861,4 @@ post_delete.connect(send_quota_disturbed, sender=Membership)
post_save.connect(send_quota_disturbed, sender=AstakosUserQuota)
post_delete.connect(send_quota_disturbed, sender=AstakosUserQuota)
post_save.connect(send_quota_disturbed, sender=AstakosGroupQuota)
post_delete.connect(send_quota_disturbed, sender=AstakosGroupQuota)
\ No newline at end of file
post_delete.connect(send_quota_disturbed, sender=AstakosGroupQuota)
......@@ -781,7 +781,6 @@ def group_add(request, kind_name='default'):
if request.method == 'POST':
form = form_class(request.POST, request.FILES)
if form.is_valid():
print '!!!!!!!!!! CLEANED DATA', form.cleaned_data
return render_response(
template='im/astakosgroup_form_summary.html',
context_instance=get_context(request),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment