assignment: Fix period ends in email.

This commit is contained in:
Ben Sturmfels 2021-12-11 10:25:57 +11:00
parent b0263491a0
commit c9a76ea17f
Signed by: bsturmfels
GPG key ID: 023C05E2C9C068F0
2 changed files with 3 additions and 1 deletions

View file

@ -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']

View file

@ -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)})