diff options
| author | Ryan P Kilby <kilbyr@gmail.com> | 2025-06-27 13:03:16 -0700 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-09-22 09:52:22 -0400 |
| commit | f9a44cc0fac653f8e0c2ab1cdfb12b2cc5c63fc2 (patch) | |
| tree | 75f9c83246e20abc63c70e63d6ac02b7c326d66a /tests/model_fields/test_field_flags.py | |
| parent | dce1b9c2de00a3385c029c02dca325f44e7697a4 (diff) | |
Fixed #35453 -- Made ManyToManyField.concrete False.
ManyToManyField was already excluded from fields, concrete_fields,
and local_concrete_fields in Options.
Diffstat (limited to 'tests/model_fields/test_field_flags.py')
| -rw-r--r-- | tests/model_fields/test_field_flags.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/model_fields/test_field_flags.py b/tests/model_fields/test_field_flags.py index 33f3334567..778a43eb63 100644 --- a/tests/model_fields/test_field_flags.py +++ b/tests/model_fields/test_field_flags.py @@ -6,6 +6,7 @@ from .models import AllFieldsModel NON_CONCRETE_FIELDS = ( models.ForeignObject, + models.ManyToManyField, GenericForeignKey, GenericRelation, ) @@ -209,7 +210,7 @@ class FieldFlagsTests(test.SimpleTestCase): def test_model_and_reverse_model_should_equal_on_relations(self): for field in AllFieldsModel._meta.get_fields(): is_concrete_forward_field = field.concrete and field.related_model - if is_concrete_forward_field: + if is_concrete_forward_field or field.many_to_many: reverse_field = field.remote_field self.assertEqual(field.model, reverse_field.related_model) self.assertEqual(field.related_model, reverse_field.model) |
