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:
parent
502fc3ae56
commit
6211527fa2
|
@ -1050,6 +1050,10 @@ class Query(object):
|
||||||
raise ValueError("Cannot use None as a query value")
|
raise ValueError("Cannot use None as a query value")
|
||||||
lookup_type = 'isnull'
|
lookup_type = 'isnull'
|
||||||
value = True
|
value = True
|
||||||
|
elif (value == '' and lookup_type == 'exact' and
|
||||||
|
connection.features.interprets_empty_strings_as_nulls):
|
||||||
|
lookup_type = 'isnull'
|
||||||
|
value = True
|
||||||
elif callable(value):
|
elif callable(value):
|
||||||
value = value()
|
value = value()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue