From c9a76ea17fe33bfa8eb6c14c23638b23635edcf2 Mon Sep 17 00:00:00 2001 From: Ben Sturmfels Date: Sat, 11 Dec 2021 10:25:57 +1100 Subject: [PATCH] assignment: Fix period ends in email. --- www/conservancy/apps/assignment/forms.py | 2 ++ www/conservancy/apps/assignment/views.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/www/conservancy/apps/assignment/forms.py b/www/conservancy/apps/assignment/forms.py index 288dc75a..cd93ea3f 100644 --- a/www/conservancy/apps/assignment/forms.py +++ b/www/conservancy/apps/assignment/forms.py @@ -65,3 +65,5 @@ class AssignmentForm(forms.ModelForm): if self.cleaned_data['period_end_type'] == 'a specific past date' and not self.cleaned_data['period_ends']: raise ValidationError('This field is required') + + return self.cleaned_data['period_ends'] diff --git a/www/conservancy/apps/assignment/views.py b/www/conservancy/apps/assignment/views.py index ac455460..c782a61e 100644 --- a/www/conservancy/apps/assignment/views.py +++ b/www/conservancy/apps/assignment/views.py @@ -22,7 +22,7 @@ class AssignmentCreateView(CreateView): ['denver@sfconservancy.org', 'bsturmfels@sfconservancy.org'], ) return super().form_valid(form) - + def get_success_url(self, *args, **kwargs): return reverse_lazy('assignment-thanks', kwargs={'pk': str(self.object.uuid)})