Commit aa4cd7e9 by Tom Christie

Guard against LimitOffsetPagination edge case. Closes #3303.

parent ed65db36
...@@ -423,6 +423,9 @@ class LimitOffsetPagination(BasePagination): ...@@ -423,6 +423,9 @@ class LimitOffsetPagination(BasePagination):
_divide_with_ceil(self.count - self.offset, self.limit) + _divide_with_ceil(self.count - self.offset, self.limit) +
_divide_with_ceil(self.offset, self.limit) _divide_with_ceil(self.offset, self.limit)
) )
if final < 1:
final = 1
if current > final: if current > final:
current = final current = final
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment