mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
[1.8.x] Fixed #24381 -- removed ForeignObjectRel opts and to_opts
These cached properies were causing problems with pickling, and in
addition they were confusingly defined: field.rel.model._meta was
not the same as field.rel.opts.
Instead users should use field.rel.related_model._meta inplace of
field.rel.opts, and field.rel.to._meta in place of field.rel.to_opts.
Backport of f95122e541 from master
This commit is contained in:
committed by
Tim Graham
parent
980dfca717
commit
155a127afb
@@ -43,6 +43,9 @@ class PickleabilityTestCase(TestCase):
|
||||
def test_membermethod_as_default(self):
|
||||
self.assert_pickles(Happening.objects.filter(number4=1))
|
||||
|
||||
def test_filter_reverse_fk(self):
|
||||
self.assert_pickles(Group.objects.filter(event=1))
|
||||
|
||||
def test_doesnotexist_exception(self):
|
||||
# Ticket #17776
|
||||
original = Event.DoesNotExist("Doesn't exist")
|
||||
|
||||
Reference in New Issue
Block a user