diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2012-07-17 07:01:01 -0700 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2012-07-17 07:01:01 -0700 |
| commit | 52df0d50b0d903c8d845404b8da89b174f8824cc (patch) | |
| tree | fd2ced6e3f992fe5d90b6c1b597b9f2e5b3c512f | |
| parent | 29132ebdef0e0b9c09e456b05f0e6a22f1106a4f (diff) | |
Switched to use a more idiomatic construct.
| -rw-r--r-- | django/db/models/sql/query.py | 2 |
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 |
