Django

Code

Changeset 8052

Show
Ignore:
Timestamp:
07/22/08 02:37:09 (5 months ago)
Author:
mtredinnick
Message:

Fixed #7791 -- Fixed a really silly error I introduced in [7926]. :-(

Files:

Legend:

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

    r8047 r8052  
    16171617            result = order_modified_iter(cursor, len(self.ordering_aliases), 
    16181618                    self.connection.features.empty_fetchmany_value) 
    1619         result = iter((lambda: cursor.fetchmany(GET_ITERATOR_CHUNK_SIZE)), 
    1620                 self.connection.features.empty_fetchmany_value) 
     1619        else: 
     1620            result = iter((lambda: cursor.fetchmany(GET_ITERATOR_CHUNK_SIZE)), 
     1621                    self.connection.features.empty_fetchmany_value) 
    16211622        if not self.connection.features.can_use_chunked_reads: 
    16221623            # If we are using non-chunked reads, we return the same data 
  • django/trunk/tests/regressiontests/queries/models.py

    r7939 r8052  
    823823True 
    824824 
     825Bug #7791 -- there were "issues" when ordering and distinct-ing on fields 
     826related via ForeignKeys. 
     827>>> Note.objects.order_by('extrainfo__info').distinct() 
     828[<Note: n3>, <Note: n1>, <Note: n2>] 
     829 
    825830"""} 
    826831