mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-21 21:53:30 +00:00
Fix for mailing lists
This commit is contained in:
parent
10dfb2c122
commit
b7483513be
@ -296,6 +296,9 @@ class Mailing(models.Model):
|
||||
def can_view(self, user):
|
||||
return self.club.has_rights_in_club(user)
|
||||
|
||||
def can_be_edited_by(self, user):
|
||||
return self.club.has_rights_in_club(user)
|
||||
|
||||
def delete(self):
|
||||
for sub in self.subscriptions.all():
|
||||
sub.delete()
|
||||
|
@ -509,6 +509,9 @@ class ClubMailingView(ClubTabsMixin, ListView):
|
||||
kwargs['has_objects'] = len(kwargs['object_list']) > 0
|
||||
return kwargs
|
||||
|
||||
def get_object(self):
|
||||
return self.club
|
||||
|
||||
|
||||
class MailingGenericCreateView(CreateView, SingleObjectMixin):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user