From 8a2ec55b180d3fddf4578de2e6759127c8250ce7 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sat, 2 Mar 2019 03:19:21 -0800 Subject: [PATCH] Merged isinstance() calls. Follow up to 0214f367bc84d7217e42ae0441d500d31c6a5b78. --- tests/model_meta/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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