Django

Code

Changeset 7812

Show
Ignore:
Timestamp:
07/01/08 05:12:50 (5 months ago)
Author:
mtredinnick
Message:

Modified [7760] to not include a "col is not NULL" fragment for non-nullable fields.

This avoids any use of "pk is not NULL" fragment, which behave inconsistently
in MySQL. Thanks to Russell Keith-Magee for diagnosing the problem and
suggesting the easy fix.

Refs #7076.

Files:

Legend:

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

    r7791 r7812  
    11321132                            self.where.add(entry, AND) 
    11331133                            break 
    1134                 elif not (lookup_type == 'in' and not value)
     1134                elif not (lookup_type == 'in' and not value) and field.null
    11351135                    # Leaky abstraction artifact: We have to specifically 
    11361136                    # exclude the "foo__in=[]" case from this handling, because