Ticket #7698: query.py.diff

File query.py.diff, 1.4 KB (added by enoksrd, 16 years ago)

svn diff of my fix against django/db/models/sql/query.py r7602

  • usr/lib/python2.5/site-packages/django/db/models/sql/query.py

     
    281281
    282282        # FIXME: Pull this out to make life easier for Oracle et al.
    283283        if with_limits:
    284             if self.high_mark:
     284            if self.high_mark is not None:
    285285                result.append('LIMIT %d' % (self.high_mark - self.low_mark))
    286             if self.low_mark:
    287                 if not self.high_mark:
     286            if self.low_mark is not None:
     287                if self.high_mark is None:
    288288                    val = self.connection.ops.no_limit_value()
    289289                    if val:
    290290                        result.append('LIMIT %d' % val)
     
    12481248        constraints. So low is added to the current low value and both will be
    12491249        clamped to any existing high value.
    12501250        """
    1251         if high:
     1251        if high is not None:
    12521252            if self.high_mark:
    12531253                self.high_mark = min(self.high_mark, self.low_mark + high)
    12541254            else:
    12551255                self.high_mark = self.low_mark + high
    1256         if low:
     1256        if low is not None:
    12571257            if self.high_mark:
    12581258                self.low_mark = min(self.high_mark, self.low_mark + low)
    12591259            else:
Back to Top