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 Version 3
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 (last modified by )
This will work during pickle.dumps: http://paste.pocoo.org/show/278047/ but will fail when I run loads.
The reason is that
__getstate__
ofValueQueryset
puts (in this case)['name', 'deleted', 'id', 'id']
intoobj_dict['search_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/)
Change History (3)
comment:1 by , 14 years ago
Component: | Uncategorized → Database layer (models, ORM) |
---|
comment:2 by , 14 years ago
milestone: | → 1.3 |
---|
comment:3 by , 14 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.
Cleaned up the formatting.