summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoulder Sprinters <boulder-sprinters@djangoproject.com>2007-04-19 20:59:23 +0000
committerBoulder Sprinters <boulder-sprinters@djangoproject.com>2007-04-19 20:59:23 +0000
commit943189a45d5fcca992621a9f5a39847fd65656d2 (patch)
tree531eae22b50028f8b4c060d95376287fbf1e412f
parent7495b05b1251074bbe3bad296e5e1895bc2af010 (diff)
boulder-oracle-sprint: Removed django_empty_set_in_where.patch from ticket #3053 in favor of the trunk's patch.
git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@5034 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/db/models/query.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/django/db/models/query.py b/django/db/models/query.py
index 9bc111eb15..142fee04c2 100644
--- a/django/db/models/query.py
+++ b/django/db/models/query.py
@@ -771,11 +771,11 @@ def get_where_clause(lookup_type, table_prefix, field_name, value):
except KeyError:
pass
if lookup_type == 'in':
- if value:
- value_set = ','.join(['%s' for v in value])
+ in_string = ','.join(['%s' for id in value])
+ if in_string:
+ return '%s%s IN (%s)' % (table_prefix, field_name, in_string)
else:
- value_set = 'NULL'
- return '%s%s IN (%s)' % (table_prefix, field_name, value_set)
+ raise EmptyResultSet
elif lookup_type in ('range', 'year'):
return '%s%s BETWEEN %%s AND %%s' % (table_prefix, field_name)
elif lookup_type in ('month', 'day'):