From 047e371754a47dbdd5cc4e50b823ce9bf641f02f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 20 Nov 2022 17:41:49 +0000 Subject: [PATCH] Finding the first post in the timeline --- posts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/posts.py b/posts.py index c7357096b..e6168c90e 100644 --- a/posts.py +++ b/posts.py @@ -4028,7 +4028,6 @@ def _create_box_indexed(recent_posts_cache: {}, if first_post_id: first_post_id = first_post_id.replace('--', '#') first_post_id = first_post_id.replace('/', '#') - print('DEBUG: first_post_id: ' + first_post_id) with open(index_filename, 'r', encoding='utf-8') as index_file: posts_added_to_timeline = 0 while posts_added_to_timeline < items_per_page: @@ -4044,6 +4043,8 @@ def _create_box_indexed(recent_posts_cache: {}, total_posts_count = \ int((page_number - 1) * items_per_page) continue + if total_posts_count == 0: + continue # Has this post passed through the newswire voting stage? if not _passed_newswire_voting(newswire_votes_threshold,