Django

Code

Changeset 9201

Show
Ignore:
Timestamp:
10/08/08 03:37:35 (2 months ago)
Author:
mtredinnick
Message:

Applying a limit to a queryset that already had an upper limit of 0 wasn't
working properly.

Files:

Legend:

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

    r9081 r9201  
    14921492        """ 
    14931493        if high is not None: 
    1494             if self.high_mark
     1494            if self.high_mark is not None
    14951495                self.high_mark = min(self.high_mark, self.low_mark + high) 
    14961496            else: 
    14971497                self.high_mark = self.low_mark + high 
    14981498        if low is not None: 
    1499             if self.high_mark
     1499            if self.high_mark is not None
    15001500                self.low_mark = min(self.high_mark, self.low_mark + low) 
    15011501            else: 
  • django/trunk/tests/regressiontests/queries/models.py

    r9081 r9201  
    863863>>> Item.objects.all()[0:0] 
    864864[] 
     865>>> Item.objects.all()[0:0][:10] 
     866[] 
    865867 
    866868Bug #7411 - saving to db must work even with partially read result set in