Fix account deactivation

This commit is contained in:
rubenwardy 2023-04-03 20:43:26 +01:00
parent 5cbfe4cda5
commit 1235bc14db

@ -247,7 +247,8 @@ def delete(username):
db.session.delete(user)
elif "deactivate" in request.form:
user.replies.delete()
for reply in user.replies.all():
db.session.delete(reply)
for thread in user.threads.all():
db.session.delete(thread)
user.email = None