Parcourir la source

Fix number of retrieved submissions when ignoring some.

tags/v0.1^2
Ben Kurtovic il y a 12 ans
Parent
révision
c62fa09d79
1 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. +3
    -2
      earwigbot/commands/afc_submissions.py

+ 3
- 2
earwigbot/commands/afc_submissions.py Voir le fichier

@@ -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))

Chargement…
Annuler
Enregistrer