From 52df0d50b0d903c8d845404b8da89b174f8824cc Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 17 Jul 2012 07:01:01 -0700 Subject: [PATCH] Switched to use a more idiomatic construct. --- django/db/models/sql/query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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