clubs: remove useless self.request_user into ClubMemberView

This commit is contained in:
Antoine Bartuccio 2019-04-25 19:51:30 +02:00
parent f72f0639ee
commit 01803c8cf0
Signed by: klmp200
GPG Key ID: E7245548C53F904B

View File

@ -435,7 +435,7 @@ class ClubMembersView(ClubTabsMixin, CanViewMixin, DetailFormView):
def get_form_kwargs(self): def get_form_kwargs(self):
kwargs = super(ClubMembersView, self).get_form_kwargs() kwargs = super(ClubMembersView, self).get_form_kwargs()
kwargs["request_user"] = self.request_user kwargs["request_user"] = self.request.user
kwargs["club"] = self.get_object() kwargs["club"] = self.get_object()
kwargs["club_members"] = self.members kwargs["club_members"] = self.members
return kwargs return kwargs
@ -463,7 +463,6 @@ class ClubMembersView(ClubTabsMixin, CanViewMixin, DetailFormView):
return resp return resp
def dispatch(self, request, *args, **kwargs): def dispatch(self, request, *args, **kwargs):
self.request_user = request.user
self.members = ( self.members = (
self.get_object().members.filter(end_date=None).order_by("-role").all() self.get_object().members.filter(end_date=None).order_by("-role").all()
) )