com: fix error 500 when editing poster with com admin

This commit is contained in:
Antoine Bartuccio 2019-10-02 15:32:33 +02:00
parent fd5cd56f81
commit 2da0560ec8
Signed by: klmp200
GPG Key ID: E7245548C53F904B

View File

@ -739,8 +739,7 @@ class PosterEditBaseView(UpdateView):
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
kwargs = super(PosterEditBaseView, self).get_context_data(**kwargs) kwargs = super(PosterEditBaseView, self).get_context_data(**kwargs)
if not self.request.user.is_com_admin: kwargs["club"] = kwargs.get("club", self.club)
kwargs["club"] = self.club
return kwargs return kwargs
def form_valid(self, form): def form_valid(self, form):