mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Remove debug messages.
This commit is contained in:
parent
37d2e8f38e
commit
63600c1301
@ -1,4 +1,4 @@
|
||||
from app import db, logger
|
||||
from app import db
|
||||
from flask import current_app, flash, redirect, render_template, url_for
|
||||
from flask_login import current_user, login_required, logout_user
|
||||
from threading import Thread
|
||||
@ -19,7 +19,6 @@ def settings():
|
||||
# Check if edit_email_form is submitted and valid
|
||||
if (edit_email_form.save_email.data
|
||||
and edit_email_form.validate_on_submit()):
|
||||
logger.warning('edit_email_form submitted')
|
||||
db.session.add(current_user)
|
||||
db.session.commit()
|
||||
flash('Your email address has been updated.')
|
||||
@ -27,7 +26,6 @@ def settings():
|
||||
# Check if edit_settings_form is submitted and valid
|
||||
if (edit_general_settings_form.save_settings.data
|
||||
and edit_general_settings_form.validate_on_submit()):
|
||||
logger.warning('edit_general_settings_form submitted')
|
||||
current_user.is_dark = edit_general_settings_form.dark_mode.data
|
||||
db.session.add(current_user)
|
||||
db.session.commit()
|
||||
@ -36,14 +34,12 @@ def settings():
|
||||
# Check if edit_password_form is submitted and valid
|
||||
if (edit_password_form.save_password.data
|
||||
and edit_password_form.validate_on_submit()):
|
||||
logger.warning('edit_password_form submitted')
|
||||
current_user.password = edit_password_form.password.data
|
||||
db.session.add(current_user)
|
||||
db.session.commit()
|
||||
flash('Your password has been updated.')
|
||||
return redirect(url_for('profile.settings'))
|
||||
# If no form is submitted or valid, fill out fields with current values
|
||||
logger.warning('nothing submitted')
|
||||
edit_email_form.email.data = current_user.email
|
||||
edit_general_settings_form.dark_mode.data = current_user.is_dark
|
||||
return render_template(
|
||||
|
Loading…
Reference in New Issue
Block a user