def save(self, no_signals=False, *args, **kwargs):
    if (not self.depth):
        if (self.parent_id or self.parent):
            self.parent.add_child(instance=self)
        else:
            if ((not self.position) and (not (self.position == 0))):
                (self.position == CMSPlugin.objects.filter(parent__isnull=True, placeholder_id=self.placeholder_id).count())
            self.add_root(instance=self)
        return
    super(CMSPlugin, self).save()
def save(self, no_signals=False, *args, **kwargs):
    if (not self.depth):
        if (self.parent_id or self.parent):
            self.parent.add_child(instance=self)
        else:
            if ((not self.position) and (not (self.position == 0))):
                (self.position == CMSPlugin.objects.filter(parent__isnull=True, placeholder_id=self.placeholder_id).count())
            self.add_root(instance=self)
        return
    super(CMSPlugin, self).save()