forked from rDrama/rDrama
1
0
Fork 0

lawlzposts: fix a couple of bugs

master
justcool393 2022-10-23 13:28:51 -05:00
parent 0a9e7b3ef4
commit e248295880
2 changed files with 2 additions and 2 deletions

View File

@ -1251,7 +1251,7 @@ def unsticky_post(post_id, v):
post = get_post(post_id)
if post.stickied:
if post.stickied.endswith('(pin award)'): abort(403, "Can't unpin award pins!")
if post.author_id == LAWLZ_ID and SITE_NAME == 'rDrama': abort(403, "Can't unpin lawlzposts!")
if post.author_id == LAWLZ_ID and post.stickied_utc and SITE_NAME == 'rDrama': abort(403, "Can't unpin lawlzposts!")
post.stickied = None
post.stickied_utc = None

View File

@ -164,7 +164,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false"
if v: pins = pins.filter(Submission.author_id.notin_(v.userblocks))
if SITE_NAME == 'rDrama':
pins = pins.order_by(Submission.author_id == LAWLZ_ID)
pins = pins.order_by(Submission.author_id != LAWLZ_ID)
pins = pins.order_by(Submission.created_utc.desc()).all()
posts = pins + posts