mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
[1.11.x] Fixed #28418 -- Fixed queryset crash when using a GenericRelation to a proxy model.
Backport of f9e5f9ae9f from master
This commit is contained in:
@@ -244,3 +244,8 @@ class GenericRelationTests(TestCase):
|
||||
def test_ticket_22982(self):
|
||||
place = Place.objects.create(name='My Place')
|
||||
self.assertIn('GenericRelatedObjectManager', str(place.links))
|
||||
|
||||
def test_filter_on_related_proxy_model(self):
|
||||
place = Place.objects.create()
|
||||
Link.objects.create(content_object=place)
|
||||
self.assertEqual(Place.objects.get(link_proxy__object_id=place.id), place)
|
||||
|
||||
Reference in New Issue
Block a user