From a589a14ca342c0d229303e776f9c4ad9e1bcc739 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 20 Aug 2019 12:18:01 +0100 Subject: [PATCH] Avoid premature exit --- posts.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/posts.py b/posts.py index a4686186..8f3beaba 100644 --- a/posts.py +++ b/posts.py @@ -1696,10 +1696,11 @@ def createBoxBase(baseDir: str,boxname: str, \ if postsOnPageCtr > itemsPerPage: break # count the pages - postsCtr += 1 - if postsCtr >= itemsPerPage: - postsCtr = 0 - currPage += 1 + if currPage != pageNumber: + postsCtr += 1 + if postsCtr >= itemsPerPage: + postsCtr = 0 + currPage += 1 except Exception as e: print(e) if headerOnly: