def delete_selected_tree(self, modeladmin, request, queryset):
        """
        Deletes multiple instances and makes sure the MPTT fields get
        recalculated properly. (Because merely doing a bulk delete doesn't
        trigger the post_delete hooks.)
        """
        # If this is True, the confirmation page has been displayed
        if request.POST.get("post"):
            n = 0
            # TODO: The disable_mptt_updates / rebuild is a work around
            # for what seems to be a mptt problem when deleting items
            # in a loop. Revisit this, there should be a better solution.
            with queryset.model.objects.disable_mptt_updates():
                for obj in queryset:
                    if self.has_delete_permission(request, obj):
                        obj.delete()
                        n += 1
                        obj_display = force_str(obj)
                        self.log_deletion(request, obj, obj_display)
                    else:
                        logger.warning(
                            'Denied delete request by "%s" for object #%s',
                            request.user,
                            obj.id,
                        )
            if n > 0:
                queryset.model.objects.rebuild()
            self.message_user(
                request, _("Successfully deleted %(count)d items.") % {"count": n}
            )
            # Return None to display the change list page again
            return None
        else:
            # (ab)using the built-in action to display the confirmation page
            return delete_selected(self, request, queryset)

        Deletes multiple instances and makes sure the MPTT fields get
        recalculated properly. (Because merely doing a bulk delete doesn't
        trigger the post_delete hooks.)
        
feincms/admin/tree_editor.py