1
0
mirror of https://github.com/django/django.git synced 2025-10-29 00:26:07 +00:00

[1.8.x] Fixed #24505 -- Fixed clash with hidden m2m fields.

Added support for multiple m2m fields with the same 'to' model
and with related_name set to '+'.

Backport of 4ee08958f1 from master
This commit is contained in:
Marco Fucci
2015-03-26 18:47:07 +00:00
committed by Tim Graham
parent 07e594bba2
commit 0e2d3b9304
6 changed files with 44 additions and 12 deletions

View File

@@ -237,7 +237,7 @@ class RelationTreeTests(TestCase):
self.assertEqual(
sorted([field.related_query_name() for field in BasePerson._meta._relation_tree]),
sorted([
'+', '+', 'BasePerson_following_abstract+', 'BasePerson_following_abstract+',
'+', '_basepeople_hidden_+', 'BasePerson_following_abstract+', 'BasePerson_following_abstract+',
'BasePerson_following_base+', 'BasePerson_following_base+', 'BasePerson_friends_abstract+',
'BasePerson_friends_abstract+', 'BasePerson_friends_base+', 'BasePerson_friends_base+',
'BasePerson_m2m_abstract+', 'BasePerson_m2m_base+', 'Relating_basepeople+',