BertrandBordage / django-tree

Fast and easy tree structures.
BSD 3-Clause "New" or "Revised" License
88 stars 13 forks source link

Path field cannot be deserialized #15

Open jacobjove opened 8 months ago

jacobjove commented 8 months ago

Django's dumpdata command results in PathField instances being serialized like this:

    ...
    "path": "[\"0E-10\"]",
    ...

Then, loaddata results in a deserialization error because the value is a string rather than an array.

Django's documentation for custom fields notes that the to_python method should gracefully handle values of type str as well as the expected type.

Closed by #14