com: fix error when editing poster while being admin

This commit is contained in:
Antoine Bartuccio 2019-10-09 17:43:23 +02:00
parent 7be9077fce
commit 25225fc451
Signed by: klmp200
GPG Key ID: E7245548C53F904B
1 changed files with 2 additions and 1 deletions

View File

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