diff --git a/tests/model_meta/tests.py b/tests/model_meta/tests.py index b62fff01bd..7867f4c620 100644 --- a/tests/model_meta/tests.py +++ b/tests/model_meta/tests.py @@ -27,7 +27,7 @@ class OptionsBaseTests(SimpleTestCase): return None if model == current_model else model def _details(self, current_model, relation): - direct = isinstance(relation, Field) or isinstance(relation, GenericForeignKey) + direct = isinstance(relation, (Field, GenericForeignKey)) model = relation.model._meta.concrete_model if model == current_model: model = None