Django

Code

Changeset 6860

Show
Ignore:
Timestamp:
12/02/07 21:31:26 (10 months ago)
Author:
mtredinnick
Message:

queryset-refactor: Changed execute_sql() to not return an iterator in the
non-MULTI cases when there is an empty result set.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/queryset-refactor/django/db/models/sql/query.py

    r6762 r6860  
    989989            sql, params = self.as_sql() 
    990990        except EmptyResultSet: 
    991             raise StopIteration 
     991            if result_type == MULTI: 
     992                raise StopIteration 
     993            else: 
     994                return 
    992995 
    993996        cursor = self.connection.cursor()