mirror of
https://github.com/django/django.git
synced 2025-12-04 00:55:36 +00:00
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.
This commit is contained in:
parent
78d43a5e10
commit
f95122e541
3 changed files with 14 additions and 15 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue