From 3b2db6ec12ce7d4b32f60dd7713e5f23cac498b7 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Thu, 13 Oct 2016 16:56:54 -0400 Subject: [PATCH] Removed unneeded try/except in Query.names_to_path(). --- django/db/models/sql/query.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 6cdba87d06..5f3db65e8e 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -1324,10 +1324,7 @@ class Query(object): "querying. If it is a GenericForeignKey, consider " "adding a GenericRelation." % name ) - try: - model = field.model._meta.concrete_model - except AttributeError: - model = None + model = field.model._meta.concrete_model else: # We didn't find the current field, so move position back # one step.