From 97eb823ed0aad9286383ecc48ced0f2c5aeee42d Mon Sep 17 00:00:00 2001 From: TLSM Date: Sun, 23 Oct 2022 19:45:41 -0400 Subject: [PATCH] Fix janny pinning. --- 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 22dc0e62e..f1d5cc9dc 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1207,7 +1207,7 @@ def distinguish_post(post_id, v): def sticky_post(post_id, v): post = get_post(post_id) if post.is_banned: abort(403, "Can't sticky removed posts!") - if post.stickied.endswith('(pin award)'): + if post.stickied and post.stickied.endswith('(pin award)'): abort(403, "Can't pin award pins!") pins = g.db.query(Submission).filter(Submission.stickied != None, Submission.is_banned == False).count()