Fix: Nuke-user option broken.
This commit is contained in:
parent
495696bad6
commit
10bafa105b
1 changed files with 2 additions and 2 deletions
|
@ -1277,7 +1277,7 @@ def admin_nuke_user(v):
|
||||||
user=get_user(request.values.get("user"))
|
user=get_user(request.values.get("user"))
|
||||||
|
|
||||||
for post in g.db.query(Submission).filter_by(author_id=user.id).all():
|
for post in g.db.query(Submission).filter_by(author_id=user.id).all():
|
||||||
if post.state_mod != StateMod.REMOVED:
|
if post.state_mod == StateMod.REMOVED:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
post.state_mod = StateMod.REMOVED
|
post.state_mod = StateMod.REMOVED
|
||||||
|
@ -1285,7 +1285,7 @@ def admin_nuke_user(v):
|
||||||
g.db.add(post)
|
g.db.add(post)
|
||||||
|
|
||||||
for comment in g.db.query(Comment).filter_by(author_id=user.id).all():
|
for comment in g.db.query(Comment).filter_by(author_id=user.id).all():
|
||||||
if comment.state_mod != StateMod.REMOVED:
|
if comment.state_mod == StateMod.REMOVED:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
comment.state_mod = StateMod.REMOVED
|
comment.state_mod = StateMod.REMOVED
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue