master
justcool393 2022-10-06 00:34:57 -07:00
parent 767093d060
commit ad7f3b7363
1 changed files with 1 additions and 1 deletions

View File

@ -1213,7 +1213,7 @@ def sticky_post(post_id, v):
if not post.stickied: if not post.stickied:
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()
if pins >= PIN_LIMIT: if pins >= PIN_LIMIT:
if v.admin_level > PERMS['BYPASS_PIN_LIMIT']: if v.admin_level >= PERMS['BYPASS_PIN_LIMIT']:
post.stickied = v.username post.stickied = v.username
post.stickied_utc = int(time.time()) + 3600 post.stickied_utc = int(time.time()) + 3600
else: return {"error": f"Can't exceed {PIN_LIMIT} pinned posts limit!"}, 403 else: return {"error": f"Can't exceed {PIN_LIMIT} pinned posts limit!"}, 403