Skip to content

Commit

Permalink
Fix lastpage computation with orphaning
Browse files Browse the repository at this point in the history
  • Loading branch information
gbastien committed Apr 28, 2015
1 parent df92c3b commit 4151149
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Changelog
1.0.4 (unreleased)
------------------

- Nothing changed yet.
- Fix lastpage computation with orphaning
[gbastien]


1.0.3 (2015-02-20)
Expand Down Expand Up @@ -54,4 +55,3 @@ Changelog

- Factored out Plone batching implementation to seperate egg (PLIP #12235)
[tom_gross]

5 changes: 1 addition & 4 deletions plone/batching/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,7 @@ def firstpage(self):
def lastpage(self):
""" Last page of batch
"""
pages = self.sequence_length / self.pagesize
if (self.sequence_length - self.orphan) % self.pagesize:
pages += 1
return pages
return self.numpages

@property
def islastpage(self):
Expand Down

0 comments on commit 4151149

Please sign in to comment.