summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2012-07-17 07:01:01 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2012-07-17 07:01:01 -0700
commit52df0d50b0d903c8d845404b8da89b174f8824cc (patch)
treefd2ced6e3f992fe5d90b6c1b597b9f2e5b3c512f
parent29132ebdef0e0b9c09e456b05f0e6a22f1106a4f (diff)
Switched to use a more idiomatic construct.
-rw-r--r--django/db/models/sql/query.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index 118bc1e14f..53dad608bf 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -1655,7 +1655,7 @@ class Query(object):
except MultiJoin:
raise FieldError("Invalid field name: '%s'" % name)
except FieldError:
- if name.find(LOOKUP_SEP) != -1:
+ if LOOKUP_SEP in name:
# For lookups spanning over relationships, show the error
# from the model on which the lookup failed.
raise