From fb0f926f6230968157c63a4b1947a6b2de3affbc Mon Sep 17 00:00:00 2001 From: Jorran de Wit <jorrandewit@outlook.com> Date: Tue, 31 Jan 2017 09:35:35 +0100 Subject: [PATCH] Fix bug in RequestCommentaryForm New Commentary requests were not completed as the `requested_by` field was not properly saved. --- commentaries/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commentaries/forms.py b/commentaries/forms.py index 22632aafe..77b605671 100644 --- a/commentaries/forms.py +++ b/commentaries/forms.py @@ -71,7 +71,7 @@ class RequestCommentaryForm(forms.ModelForm): def save(self, *args, **kwargs): """Prefill instance before save""" - self.requested_by = Contributor.objects.get(user=self.user) + self.instance.requested_by = Contributor.objects.get(user=self.user) return super(RequestCommentaryForm, self).save(*args, **kwargs) def get_existing_commentary(self): -- GitLab