I am having IntegrityError issues with a depth field in the MP_Node.
whenever I try to save on a table I get the error of depth cannot be null and I don't know why I keep getting this.. This is a schema of the model I am using it with class Courses(MP_Node): course_id = models.UUIDField(default=uuid.uuid4, editable=False) course_name = models.CharField(max_length=250, null=True) course_description = models.TextField(null=True) course_content = models.CharField(max_length=250, null=True) course_admin = models.ForeignKey( "CustomUser", on_delete=models.CASCADE, null=True, blank=True, related_name="course_admin", ) course_price = models.CharField(max_length=250, null=True, blank=True) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True)
objects = MP_NodeManager()
node_order_by = ["course_name"]
def __str__(self):
return f"{self.course_name} + {self.course_admin}"
I'm also seeing this issue and finding it tricky to figure out why. @damilareonifade did you manage to find a solution?
i am also having the same issue
@bickkysahand @nickpolet I am still having this same issue. I had to use django-mptt in my last application. Still worried on what this will give me now
Issue still here. Is it possible no one replied for months. Can we expect an answer or just ditch treebeard from custom apps?
Using treebeard 4.7.1, did as stated in the docs but no luck. So please update the docs if we are all misusing it.