def save(self):
        """Save the form result."""
        if not self.cleaned_data['confirm']:
            return
        user = self.cleaned_data['user']
        most_recent_threads = Thread.objects.filter(
            latest_message__sender=user,
        ).exclude(first_message__sender=user)
        for thread in most_recent_threads:
            try:
                latest_message = thread.message_set.exclude(
                    sender=user).filter(status='approved').latest('created_at')
            except __HOLE__:
                continue
            thread.latest_message = latest_message
            thread.save()

        User.objects.filter(
            pk=user.pk).update(is_banned=True)
dataset/ETHPy150Open ofa/connect/open_connect/accounts/forms.py/BanUserForm.save