summaryrefslogtreecommitdiff
path: root/django/db/models/sql/query.py
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-07-22 08:23:20 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-07-22 08:23:20 +0000
commit8745beccb10f60864910b7941d7d0c99a5db30ed (patch)
treefb0dae79f8aef995590baad144e5fc92a19f3053 /django/db/models/sql/query.py
parent83e97ecf885676f29170ee036ca210d28dfe19fb (diff)
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
Diffstat (limited to 'django/db/models/sql/query.py')
-rw-r--r--django/db/models/sql/query.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index ce3b49cd42..2577b57a33 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -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