Django

Code

Changeset 2236

Show
Ignore:
Timestamp:
02/03/06 07:03:51 (3 years ago)
Author:
lukeplant
Message:

magic-removal: Fixed bug in parse_lookup introduced in 2150, and tidied up a bit

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/magic-removal/django/db/models/query.py

    r2223 r2236  
    575575 
    576576    for kwarg, value in kwarg_items: 
    577         if value is None: 
    578             pass 
    579         else: 
     577        if value is not None: 
    580578            path = kwarg.split(LOOKUP_SEPARATOR) 
    581579            # Extract the last elements of the kwarg. 
     
    600598                raise TypeError, "Cannot parse keyword query %r" % kwarg 
    601599 
    602         tables2, joins2, where2, params2 = lookup_inner(path, clause, value, opts, opts.db_table, None) 
    603         tables.extend(tables2) 
    604         joins.update(joins2) 
    605         where.extend(where2) 
    606         params.extend(params2) 
     600            tables2, joins2, where2, params2 = lookup_inner(path, clause, value, opts, opts.db_table, None) 
     601            tables.extend(tables2) 
     602            joins.update(joins2) 
     603            where.extend(where2) 
     604            params.extend(params2) 
    607605    return tables, joins, where, params 
    608606