Fix some fields not being cleared in user deactivation

This commit is contained in:
rubenwardy 2024-03-06 18:25:41 +00:00
parent 1d1709d3d4
commit 47feb9edc4

@ -275,6 +275,9 @@ def delete(username):
db.session.delete(reply) db.session.delete(reply)
for thread in user.threads.all(): for thread in user.threads.all():
db.session.delete(thread) db.session.delete(thread)
for token in user.tokens.all():
db.session.delete(token)
user.profile_pic = None
user.email = None user.email = None
if user.rank != UserRank.BANNED: if user.rank != UserRank.BANNED: