#26743: DeserializationError local variable 'pk' referenced before assignment
(which hides real error)
-------------------------------------+-------------------------------------
Reporter: lakinwecker | Owner: nobody
Type: Bug | Status: new
Component: Core | Version: 1.9
(Serialization) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by lakinwecker):
I'm not sure I fully understand how reversion is using the serialization
so it would likely take me some time. My idea of a test case to try
would be:
1. Create model with FK to another model.
2. Create instance of said model with None value.
3. Serialize said instance, save value.
4. Change field to M2M.
5. Migrate
5. Attempt to restore model from previously serialized data.
But I'm not sure when I'll find time to try this out. I also don't know
how I would turn this into a unit test either.
--
Ticket URL: <https://code.djangoproject.com/ticket/26743#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/069.bf355a25d1d596a9a5e1965ce5815903%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.