1
0
mirror of https://github.com/django/django.git synced 2025-03-06 07:22:32 +00:00

Replaced exact lookups of the empty string with isnull lookups in Oracle. Fixes the testPreventDuplicateComments case.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8827 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Ian Kelly 2008-09-01 23:18:42 +00:00
parent 502fc3ae56
commit 6211527fa2

View File

@ -1050,6 +1050,10 @@ class Query(object):
raise ValueError("Cannot use None as a query value")
lookup_type = 'isnull'
value = True
elif (value == '' and lookup_type == 'exact' and
connection.features.interprets_empty_strings_as_nulls):
lookup_type = 'isnull'
value = True
elif callable(value):
value = value()