From f665941e1695199bec429ef6b6c14f9733431233 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Tue, 1 Nov 2022 15:15:29 -0500 Subject: [PATCH] pins: use variable instead of recomputing again --- files/routes/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index 361d6694c4..57e3222c20 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1188,12 +1188,12 @@ def sticky_post(post_id, v): abort(403, f"Can't exceed {PIN_LIMIT} pinned posts limit!") if not post.stickied_utc: - post.stickied_utc = int(time.time()) + 3600 + post.stickied_utc = sticky_time pin_time = 'for 1 hour' if v.id != post.author_id: send_repeatable_notification(post.author_id, f"@{v.username} (Admin) has pinned [{post.title}](/post/{post_id})!") else: - post.stickied_utc = None + post.stickied_utc = sticky_time pin_time = 'permanently' post.stickied = v.username