def clean(self):
        domain = self.cleaned_data.get('domain')
        thread = self.cleaned_data.get('thread')

        if not thread or not domain:
            raise forms.ValidationError(_("thread not provided"))

        if not thread.allow_comments:
            raise forms.ValidationError(_("comments not allowed"))

        try:
            site = Site.objects.get(domain=domain)
            if not self.user.is_anonymous():
                if self.user.hidden.filter(id=site.id):
                    raise forms.ValidationError(
                        _('user is disabled on site with id %s') % site.id
                    )
            site.threads.get(id=thread.id)
        except Thread.DoesNotExist:
            raise forms.ValidationError(
                thread.id % _('thread with id %s does not exist')
            )

        return self.cleaned_data
dataset/ETHPy150Open c4all/c4all/comments/forms.py/PostCommentForm.clean/swapped operands of `%`