mirror of
https://github.com/django/django.git
synced 2025-12-02 00:01:29 +00:00
Fixed #7813 -- Allow pickling of Query classes that use select_related().
Based on a patch from Justin Bronn. The test in this patch most likely breaks on Oracle. That's another issue. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8053 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
83e97ecf88
commit
8745beccb1
2 changed files with 11 additions and 0 deletions
|
|
@ -106,6 +106,8 @@ class Query(object):
|
|||
Pickling support.
|
||||
"""
|
||||
obj_dict = self.__dict__.copy()
|
||||
obj_dict['related_select_fields'] = []
|
||||
obj_dict['related_select_cols'] = []
|
||||
del obj_dict['connection']
|
||||
return obj_dict
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue