Skip to content

Commit

Permalink
Switched to use a more idiomatic construct.
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Jul 17, 2012
1 parent 29132eb commit 52df0d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django/db/models/sql/query.py
Expand Up @@ -1655,7 +1655,7 @@ def add_fields(self, field_names, allow_m2m=True):
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
Expand Down

0 comments on commit 52df0d5

Please sign in to comment.