Opened 14 years ago
Last modified 10 years ago
#14515 closed
Can't pickle ValueQuerySet if query references fields, which aren't on the same model. — at Initial Version
Reported by: | Florian Apolloner | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.2 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
This will work during pickle.dumps: http://paste.pocoo.org/show/278047/ but will fail when I run loads.
The reason is that getstate of ValueQueryset puts (in this case) ['name', 'deleted', 'id', 'id'] into obj_dictsearch_fields (http://code.djangoproject.com/browser/django/trunk/django/db/models/sql/query.py#L176); during loads it won't find Page.deleted etc… (full traceback: http://paste.pocoo.org/show/278050/)
Note:
See TracTickets
for help on using tickets.