@@ -59,6 +59,9 @@ class AssignmentForm(forms.ModelForm):
'attestation_of_copyright',
]
def clean_period_ends(self):
if 'period_begins' in self.cleaned_data and 'period_ends' in self.cleaned_data and self.cleaned_data['period_begins'] and self.cleaned_data['period_ends'] and self.cleaned_data['period_begins'] > self.cleaned_data['period_ends']:
raise ValidationError('End of period is before start')
if self.cleaned_data['period_end_type'] == 'a specific past date' and not self.cleaned_data['period_ends']: