diff --git a/files/routes/admin.py b/files/routes/admin.py index 57e3222c20..85df42eb17 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1182,7 +1182,7 @@ def sticky_post(post_id, v): pins = g.db.query(Submission).filter(Submission.stickied != None, Submission.is_banned == False).count() extra_pin_slots = 1 if post.stickied else 0 - sticky_time = int(time.time()) + 3600 if post.stickied_utc else None + sticky_time = int(time.time()) + 3600 if not post.stickied else None if pins >= PIN_LIMIT + extra_pin_slots and v.admin_level < PERMS['BYPASS_PIN_LIMIT_IF_TEMPORARY'] and not sticky_time: abort(403, f"Can't exceed {PIN_LIMIT} pinned posts limit!")