Switched to use a more idiomatic construct.

This commit is contained in:
Alex Gaynor 2012-07-17 07:01:01 -07:00
parent 29132ebdef
commit 52df0d50b0
1 changed files with 1 additions and 1 deletions

View File

@ -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