Remove email from user on unsubscribe

This commit is contained in:
rubenwardy 2020-12-05 21:24:14 +00:00
parent 6e3d32a9d5
commit d654113204

@ -340,6 +340,9 @@ def unsubscribe_manage(sub: EmailSubscription):
user = User.query.filter_by(email=sub.email).first()
if request.method == "POST":
if user:
user.email = None
sub.blacklisted = True
db.session.commit()