master
Aevann1 2021-12-17 05:44:26 +02:00
parent 6c58dc6562
commit faaabd4f86
1 changed files with 2 additions and 2 deletions

View File

@ -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)