mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-30 22:29:32 +00:00
pedagogy: fix error with author change on comment when edited by an admin
This commit is contained in:
2 files changed
+4
-2
No files matched your search
+3
-2
@@ -110,8 +110,9 @@ class UVCommentUpdateView(CanEditPropMixin, UpdateView):
|
||||
|
||||
def get_form_kwargs(self):
|
||||
kwargs = super(UVCommentUpdateView, self).get_form_kwargs()
|
||||
kwargs["author_id"] = self.request.user.id
|
||||
kwargs["uv_id"] = self.get_object().uv.id
|
||||
obj = self.get_object()
|
||||
kwargs["author_id"] = obj.author.id
|
||||
kwargs["uv_id"] = obj.uv.id
|
||||
|
||||
return kwargs
|
||||
|
||||
|
||||
Reference in new issue
Block a user