

@classmethod
def fix_tree(cls, destructive=False):
    '\n        Fixes the plugin tree by first calling treebeard fix_tree and the\n        recalculating the correct position property for each plugin.\n        '
    from cms.utils.plugins import reorder_plugins
    super(CMSPlugin, cls).fix_tree(language)
    for placeholder in Placeholder.objects.all():
        for (language, __) in settings.LANGUAGES:
            order = CMSPlugin.objects.filter(placeholder_id=placeholder.pk, language=language, parent_id__isnull=True).order_by('position').values_list('pk', flat=True)
            reorder_plugins(placeholder, None, language, order)
            for plugin in CMSPlugin.objects.filter(placeholder_id=placeholder.pk, language=language).order_by('depth', 'path'):
                order = CMSPlugin.objects.filter(parent_id=plugin.pk).order_by('position').values_list('pk', flat=True)
                reorder_plugins(placeholder, plugin.pk, language, order)

dataset/ETHPy150Open divio/django-cms/cms/models/pluginmodel.py CMSPlugin.fix_tree/VarMisuse@37/96 `destructive`->`language`