From c62fa09d79e7d7e7cd11aa487f49d35a7c6ef904 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Thu, 5 Jul 2012 04:57:10 -0400 Subject: [PATCH] Fix number of retrieved submissions when ignoring some. --- earwigbot/commands/afc_submissions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/earwigbot/commands/afc_submissions.py b/earwigbot/commands/afc_submissions.py index 6fc8139..db24395 100644 --- a/earwigbot/commands/afc_submissions.py +++ b/earwigbot/commands/afc_submissions.py @@ -55,7 +55,8 @@ class AFCSubmissions(Command): site = self.bot.wiki.get_site() category = site.get_category("Pending AfC submissions") - members = category.get_members(use_sql=True, limit=number) + limit = number + len(self_ignore_list) + members = category.get_members(use_sql=True, limit=limit) urls = [member.url for member in members if member.title not in self.ignore_list] - pages = ", ".join(urls) + pages = ", ".join(urls[:number]) self.reply(data, "{0} pending AfC subs: {1}".format(number, pages))