def save(self, user=None):
        """Save the tag and case associations."""
        user = user or self.user
        tag = super(TagForm, self).save(user=user)

        # it's possible the user submitted the form before the ajax loaded
        # the included and available cases.  So ``caseversions`` would not
        # show in the changed_data.  If that's the case, we prevent updating
        # the list of cases.
        if self.changed_data in "caseversions":
            TagCV = tag.caseversions.through

            # @@@ used to be delete() instead of clear.  May be remove?
            # why is delete() ok for cases of suites?  must be some special checking
            # for that.
            tag.caseversions.clear()
            tcv_list = [TagCV(tag=tag, caseversion=cv)
                for cv in self.cleaned_data["caseversions"]]

            TagCV.objects.bulk_create(tcv_list)

        return tag
dataset/ETHPy150Open mozilla/moztrap/moztrap/view/manage/tags/forms.py/TagForm.save/swapped operands of `in`