not post.stickied_utc

master
justcool393 2022-11-01 15:19:35 -05:00
parent f665941e16
commit 2fed50cb46
1 changed files with 1 additions and 1 deletions

View File

@ -1182,7 +1182,7 @@ def sticky_post(post_id, v):
pins = g.db.query(Submission).filter(Submission.stickied != None, Submission.is_banned == False).count() pins = g.db.query(Submission).filter(Submission.stickied != None, Submission.is_banned == False).count()
extra_pin_slots = 1 if post.stickied else 0 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: 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!") abort(403, f"Can't exceed {PIN_LIMIT} pinned posts limit!")