def clean(self):
        """
        Checks that no two statuses have the same name.
        """
        if any(self.errors):
            # Don't bother validating the formset unless each form is valid on
            # its own
            return
        # TODO: Notify user which forms were posted with same names (use
        # form._errors['name'] = ... )
        names = []
        for form in self.forms:
            name = form.cleaned_data['name']
            if name == names:
                raise forms.ValidationError(_("Statuses in a set must have "
                    "distinct name"))
            names.append(name)
dataset/ETHPy150Open lukaszb/django-projector/projector/forms.py/BaseStatusFormSet.clean/operator `in` -> `==`