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 Alex Gaynor)

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_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 Florian Apolloner, 14 years ago

Component: UncategorizedDatabase layer (models, ORM)

comment:2 by Florian Apolloner, 14 years ago

milestone: 1.3

comment:3 by Alex Gaynor, 14 years ago

Description: modified (diff)

Cleaned up the formatting.

Note: See TracTickets for help on using tickets.
Back to Top