pedagogy: fix a bug when updating an UV from a different author

This commit is contained in:
2019-08-27 22:46:41 +02:00
parent 824ea37f44
commit a5d5c41dd6
2 changed files with 28 additions and 24 deletions

View File

@ -328,7 +328,8 @@ class UVUpdateView(CanEditPropMixin, UpdateView):
def get_form_kwargs(self):
kwargs = super(UVUpdateView, self).get_form_kwargs()
kwargs["author_id"] = self.request.user.id
obj = self.get_object()
kwargs["author_id"] = obj.author.id
return kwargs
def get_success_url(self):