Author: bouldersprinters
Date: 2007-04-19 12:56:53 -0500 (Thu, 19 Apr 2007)
New Revision: 5031
Modified:
django/branches/boulder-oracle-sprint/django/db/models/query.py
Log:
boulder-oracle-sprint: Fixed application of django_empty_set_in_where.patch
from ticket #3053.
Modified: django/branches/boulder-oracle-sprint/django/db/models/query.py
===================================================================
--- django/branches/boulder-oracle-sprint/django/db/models/query.py
2007-04-19 12:49:40 UTC (rev 5030)
+++ django/branches/boulder-oracle-sprint/django/db/models/query.py
2007-04-19 17:56:53 UTC (rev 5031)
@@ -771,15 +771,11 @@
except KeyError:
pass
if lookup_type == 'in':
- in_string = ','.join(['%s' for id in value])
- if in_string:
- if value:
- value_set = ','.join(['%s' for v in value])
- else:
- value_set = 'NULL'
- return '%s%s IN (%s)' % (table_prefix, field_name, value_set)
+ if value:
+ value_set = ','.join(['%s' for v in value])
else:
- raise EmptyResultSet
+ value_set = 'NULL'
+ return '%s%s IN (%s)' % (table_prefix, field_name, value_set)
elif lookup_type in ('range', 'year'):
return '%s%s BETWEEN %%s AND %%s' % (table_prefix, field_name)
elif lookup_type in ('month', 'day'):
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---