From c9a76ea17fe33bfa8eb6c14c23638b23635edcf2 2021-12-10 23:25:57 From: Ben Sturmfels Date: 2021-12-10 23:25:57 Subject: [PATCH] assignment: Fix period ends in email. --- diff --git a/www/conservancy/apps/assignment/forms.py b/www/conservancy/apps/assignment/forms.py index 288dc75aa54bcfee7bf8e7da40aad497b97e6328..cd93ea3f1eff15f6c3eb7e922688a33a41a70fcf 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 ac4554603db3b13dce79894b73da240378b1682e..c782a61eaaaf4a6ab692637e352f0572ea13b591 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)})