Skip to content

django dataload > 'NoneType' object has no attribute 'get_parent_pk' #88

@damienSD

Description

@damienSD

Python version
3.11

Django version
4.1.7

Package version
0.19.0

Current behavior (bug description)

With Simple Model with no relation

class MyModel(models.Model, TreeNodeModel):
    ...
    name: str = models.CharField(max_length=50)
    treenode_display_field = "name"
    ...

After some inserts with parentals relations, then a django dumpdata with this model only :

python manage.py dumpdata MyModel --output=my_model.json

on a standart django dataload :

python manage.py loaddata my_model
> AttributeError: Problem installing fixture 'my_model.json': 'NoneType' object has no attribute 'get_parent_pk'

Expected behavior

dataload OK

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions