1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

Fixed #13328 -- Ensured that querysets on models with callable defaults can be pickled. No, really this time. Thanks to Alex for his help brainstorming the solution.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13013 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee
2010-04-21 16:34:33 +00:00
parent e8eac32901
commit 3fb57d47bd
8 changed files with 64 additions and 36 deletions

View File

@@ -108,7 +108,7 @@ class Options(object):
if self.order_with_respect_to:
self.order_with_respect_to = self.get_field(self.order_with_respect_to)
self.ordering = ('_order',)
self._order = OrderWrt(model)
model.add_to_class('_order', OrderWrt())
else:
self.order_with_respect_to = None
@@ -330,8 +330,6 @@ class Options(object):
cache[f.name] = (f, model, True, True)
for f, model in self.get_fields_with_model():
cache[f.name] = (f, model, True, False)
if self.order_with_respect_to:
cache['_order'] = self._order, None, True, False
if app_cache_ready():
self._name_map = cache
return cache