def save(self, *args, **kwargs):
        if self.instance:
            if self.is_valid():
                if self.cleaned_data['location']:
                    self.instance.location = self.cleaned_data['location']
                if self.cleaned_data['status']:
                    self.instance.status = self.cleaned_data['status']
                self.instance.save()
                if self.cleaned_data['delete']:
                    if self.cleaned_data['delete'] == 'delete':
                        self.instance.delete()
                    if self.cleaned_data['delete'] == 'trash':
                        self.instance.trash = True
                        self.instance.save()
Process form
dataset/ETHPy150Open treeio/treeio/treeio/infrastructure/forms.py/MassActionForm.save