fsd
This commit is contained in:
parent
f8bb7a99be
commit
fd655eadec
12 changed files with 105 additions and 31 deletions
|
@ -1040,7 +1040,9 @@ def api_sticky_post(post_id, v):
|
|||
|
||||
post = g.db.query(Submission).options(lazyload('*')).filter_by(id=post_id).first()
|
||||
if post:
|
||||
if post.stickied: post.stickied = None
|
||||
if post.stickied:
|
||||
if post.stickied.startswith("t:"): abort(403)
|
||||
else: post.stickied = None
|
||||
else: post.stickied = v.username
|
||||
g.db.add(post)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue