def save(self, user=None):
        """Save the edited caseversion."""
        user = user or self.user
        assert self.is_valid()

        version_kwargs = self.cleaned_data.copy()
        del version_kwargs["add_tags"]
        del version_kwargs["add_attachment"]

        idprefix = version_kwargs.pop("idprefix")
        priority = version_kwargs.pop("priority")

        for k, v in version_kwargs.items():
            setattr(self.instance, k, v)

        if self.instance.case.idprefix != idprefix:
            self.instance.case.idprefix = idprefix
            self.instance.case.save(force_update=True)

        if self.instance.case.priority != priority:
            try:
                int(priority)
            except __HOLE__:
                priority = None
            self.instance.case.priority = priority
            self.instance.case.save(force_update=True)

        self.instance.save(force_update=True)

        self.save_new_tags(self.instance.case.product)
        self.save_tags(self.instance)
        self.save_attachments(self.instance)
        self.steps_formset.save(user=user)

        return self.instance
dataset/ETHPy150Open mozilla/moztrap/moztrap/view/manage/cases/forms.py/EditCaseVersionForm.save