Django

Code

Changeset 8827

Show
Ignore:
Timestamp:
09/01/08 18:18:42 (3 months ago)
Author:
ikelly
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/db/models/sql/query.py

    r8794 r8827  
    10511051            lookup_type = 'isnull' 
    10521052            value = True 
     1053        elif (value == '' and lookup_type == 'exact' and 
     1054              connection.features.interprets_empty_strings_as_nulls): 
     1055            lookup_type = 'isnull' 
     1056            value = True 
    10531057        elif callable(value): 
    10541058            value = value()