fsdsfd
This commit is contained in:
parent
73f270c2e4
commit
2480293792
1 changed files with 2 additions and 2 deletions
|
@ -57,8 +57,8 @@ def revert_actions(v, username):
|
|||
|
||||
cutoff = int(time.time()) - 86400
|
||||
|
||||
posts = (x[0] for x in g.db.query(ModAction.target_submission_id).filter(ModAction.user_id == user.id, ModAction.created_utc > cutoff, ModAction.kind == 'ban_post').all())
|
||||
comments = (x[0] for x in g.db.query(ModAction.target_comment_id).filter(ModAction.user_id == user.id, ModAction.created_utc > cutoff, ModAction.kind == 'ban_comment').all())
|
||||
posts = [x[0] for x in g.db.query(ModAction.target_submission_id).filter(ModAction.user_id == user.id, ModAction.created_utc > cutoff, ModAction.kind == 'ban_post').all()]
|
||||
comments = [x[0] for x in g.db.query(ModAction.target_comment_id).filter(ModAction.user_id == user.id, ModAction.created_utc > cutoff, ModAction.kind == 'ban_comment').all()]
|
||||
for item in posts + comments:
|
||||
item.is_banned = False
|
||||
g.db.add(item)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue