summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-10-13 16:56:54 -0400
committerGitHub <noreply@github.com>2016-10-13 16:56:54 -0400
commit3b2db6ec12ce7d4b32f60dd7713e5f23cac498b7 (patch)
tree3c38e4b68782aff03d5d6078cc770b85c3747d73 /django
parentdf1796b13fd0e36253166c47adcfda39ba0ea3df (diff)
Removed unneeded try/except in Query.names_to_path().
Diffstat (limited to 'django')
-rw-r--r--django/db/models/sql/query.py5
1 files changed, 1 insertions, 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.