mirror of
https://github.com/django/django.git
synced 2025-09-27 12:39:17 +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:
parent
502fc3ae56
commit
6211527fa2
1 changed files with 4 additions and 0 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue