forked from MarseyWorld/MarseyWorld
> to >=
parent
767093d060
commit
ad7f3b7363
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue