From 94424163dbf127d3fcf7edf0fa8867ee13bd5f03 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 16 Oct 2022 11:54:36 +0200 Subject: [PATCH] fix pinned posts --- files/routes/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index 5d2b98b9c..588c1b283 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1222,7 +1222,7 @@ def sticky_post(post_id, v): if v.id != post.author_id: send_repeatable_notification(post.author_id, f"@{v.username} (Admin) has pinned [{post.title}](/post/{post_id})!") else: - if pins >= PIN_LIMIT: + if pins >= PIN_LIMIT + 1: abort(403, f"Can't exceed {PIN_LIMIT} pinned posts limit!") post.stickied_utc = None pin_time = 'permanently'