code: def clean(self):
          
          super(CTENode, self).clean()
          if self.parent and self.pk in getattr(self.parent, self._cte_node_path):
              raise ValidationError(_("A node cannot be made a descendant of itself."))
docs: Prevents cycles in the tree.