1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Merged isinstance() calls.

Follow up to 0214f367bc.
This commit is contained in:
Jon Dufresne 2019-03-02 03:19:21 -08:00 committed by Mariusz Felisiak
parent 4492be348a
commit 8a2ec55b18

View File

@ -27,7 +27,7 @@ class OptionsBaseTests(SimpleTestCase):
return None if model == current_model else model return None if model == current_model else model
def _details(self, current_model, relation): 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 model = relation.model._meta.concrete_model
if model == current_model: if model == current_model:
model = None model = None