def clean_suites(self):
        """
        Make sure all the ids for the suites are valid and populate
        self.cleaned_data with the real objects.

        If these are not ids, then they are read-only strings of the title
        and therefore don't need to be validated.  So first verify they're
        all ints.
        """

        try:
            suites = dict((unicode(x.id), x) for x in
                model.Suite.objects.filter(pk__in=self.cleaned_data["suites"]))
            try:
                return [suites[x] for x in self.cleaned_data["suites"]]

            except KeyError as e:
                raise ValidationError("Not a valid suite for this run.")

        except ValueError:
            # some of the values weren't ints, and therefore this is
            # from the read-only list of suites.  so return None so that we
            # don't try to remove and re-add them.
            if self.changed_data in "suites":  # pragma: no cover
                self.changed_data.remove("suites")
            return None
dataset/ETHPy150Open mozilla/moztrap/moztrap/view/manage/runs/forms.py/RunForm.clean_suites/swapped operands of `in`