help_text='Please be aware that some employment agreements explicitly transfer copyright ownership to the employer. We recommend you review your recent employment agreements for such clauses.',
)
class Meta:
model = Assignment
fields = [
'full_name',
'email',
'country_of_residence',
'repositories',
'all_emails',
'period_begins',
'period_end_type',
'period_ends',
'agreement_terms',
'attestation_of_copyright',
]
def clean_period_ends(self):
cleaned_data = super().clean()
if 'period_begins' in cleaned_data and 'period_ends' in cleaned_data and cleaned_data['period_begins'] > cleaned_data['period_ends']:
raise ValidationError('End of period is before start')