fix: let an author list a page they just checked

This commit is contained in:
randogoth 2026-10-11 16:56:53 +03:00
parent 92813ccbe3
commit a4178e6d7e
3 changed files with 24 additions and 2 deletions

View file

@ -223,9 +223,12 @@ def rate_limited(
if rejects >= DOMAIN_REJECTS_BEFORE_SLOWDOWN
else DOMAIN_COOLDOWN_MINUTES / 60
)
# Only a real attempt at listing counts. Checking a page is the sensible
# thing to do first, and it must not lock the author out of listing it.
if _count(
connection,
"SELECT COUNT(*) FROM submissions WHERE domain = ? AND created_at > ?",
"SELECT COUNT(*) FROM submissions WHERE domain = ? AND created_at > ? "
"AND outcome IN ('listed', 'updated', 'rejected')",
domain,
_since(cooldown),
):