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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user