Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Switched to use a more idiomatic construct.

  • Loading branch information...
commit 52df0d50b0d903c8d845404b8da89b174f8824cc 1 parent 29132eb
@alex alex authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/db/models/sql/query.py
View
2  django/db/models/sql/query.py
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.