mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user