def clean_language(self):
        data = self.cleaned_data['language']
        if isinstance(data, Language):
            pk = data.pk
        else:
            pk = int(data)
        if pk in self.disabled_langs:
            raise forms.ValidationError(_(u'Enter a valid value.'))
        return data
Make sure language doesn't get a invalid value.
dataset/ETHPy150Open rvanlaar/easy-transifex/src/transifex/transifex/teams/forms.py/TeamRequestSimpleForm.clean_language