Opened 10 years ago
Last modified 10 years ago
#25794 closed Bug
loaddata with UUIDs as natural foreign keys does not work anymore — at Initial Version
| Reported by: | Gunnar Scherf | Owned by: | nobody |
|---|---|---|---|
| Component: | Core (Management commands) | Version: | 1.9rc1 |
| Severity: | Normal | Keywords: | UUID loaddata --natural-foreign |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
When I run dumpdata with a model which has a UUIDField as a natural key, the dump can not be loaded anymore.
manage.py dumpdata --natural-foreign myapp manage.py loaddata myapp
The dump looks like this
[
{
"model": "accounts.applicationrole",
"fields": {
"application": [
"ec1e39cb-e3e7-46c7-87b7-70ace4165d13"
],
...
The error message in loaddata is:
'(UUID('ec1e39cb-e3e7-46c7-87b7-70ace4165d13'),)' is not a valid UUID.
Note:
See TracTickets
for help on using tickets.