prevent carp from undoing award pins

master
Aevann1 2022-10-24 19:36:35 +02:00
parent 0f8ecd48dc
commit 4b37bd721b
2 changed files with 1 additions and 3 deletions

View File

@ -462,7 +462,7 @@ class User(Base):
if self.shadowbanned and not (v and v.can_see_shadowbanned): return [] if self.shadowbanned and not (v and v.can_see_shadowbanned): return []
posts = g.db.query(Submission.id).filter_by(author_id=self.id, is_pinned=False) posts = g.db.query(Submission.id).filter_by(author_id=self.id, is_pinned=False, is_banned=False)
if not (v and (v.admin_level >= PERMS['POST_COMMENT_MODERATION'] or v.id == self.id)): if not (v and (v.admin_level >= PERMS['POST_COMMENT_MODERATION'] or v.id == self.id)):
posts = posts.filter_by(is_banned=False, private=False, ghost=False, deleted_utc=0) posts = posts.filter_by(is_banned=False, private=False, ghost=False, deleted_utc=0)

View File

@ -1121,8 +1121,6 @@ def remove_post(post_id, v):
post = get_post(post_id) post = get_post(post_id)
post.is_banned = True post.is_banned = True
post.is_approved = None post.is_approved = None
post.stickied = None
post.is_pinned = False
post.ban_reason = v.username post.ban_reason = v.username
g.db.add(post) g.db.add(post)