mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #22982 -- Added GenericRelatedObjectManager.__str__. to prevent crash.
Thanks bendavis78 for the report.
Forwardport of 29585e9b6a
from stable/1.7.x
This commit is contained in:
parent
f9f9f3ad60
commit
f676305ece
2 changed files with 7 additions and 0 deletions
|
@ -260,3 +260,7 @@ class GenericRelationTests(TestCase):
|
|||
# where the pre_delete signal should fire and prevent deletion.
|
||||
with self.assertRaises(ProtectedError):
|
||||
related.delete()
|
||||
|
||||
def test_ticket_22982(self):
|
||||
place = Place.objects.create(name='My Place')
|
||||
self.assertIn('GenericRelatedObjectManager', str(place.links))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue