forked from MarseyWorld/MarseyWorld
fsdsfd
parent
6c58dc6562
commit
faaabd4f86
|
@ -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…
Reference in New Issue