#25389: SimpleLazyObject doesn't pickle correctly when wrapping a Model
-------------------------------------+-------------------------------------
Reporter: benjaminjkraft | Owner:
| benjaminjkraft
Type: Bug | Status: assigned
Component: Database layer | Version: 1.8
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by benjaminjkraft):
For what it's worth, I've now realized that you don't actually need to do
terrifying things to `__dict__` to get the actual error; you just have to
keep a reference to a model instance as a property on the instance. I've
added an example to the gist
[https://gist.github.com/benjaminjkraft/2d330e22a58681c5db5c#file-
simpler_error-py here]; again `Foo` here simulates a model. In any case,
the fix still works.
--
Ticket URL: <https://code.djangoproject.com/ticket/25389#comment:3>
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/072.91674597e1b541e1e474edcf2f05fd32%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.