def clean(self):
        default_qs = self.__class__.objects.filter(default=True)
        if self.pk:
            default_qs = default_qs.exclude(pk=self.pk)
        if self.default and default_qs.count() > 0:
            raise ValidationError(_('Only one language can be default.'))
dataset/ETHPy150Open allegro/ralph/src/ralph/reports/models.py/ReportLanguage.clean/original