fix some errors
This commit is contained in:
@@ -110,7 +110,7 @@ def new_contact():
|
||||
company=form.company.data,
|
||||
position=form.position.data,
|
||||
notes=form.notes.data,
|
||||
is_active=form.is_active.data,
|
||||
is_active=True, # Set default value
|
||||
is_admin=form.is_admin.data,
|
||||
profile_picture=profile_picture
|
||||
)
|
||||
@@ -141,7 +141,6 @@ def edit_profile():
|
||||
current_user.company = form.company.data
|
||||
current_user.position = form.position.data
|
||||
current_user.notes = form.notes.data
|
||||
current_user.is_active = form.is_active.data
|
||||
current_user.is_admin = form.is_admin.data
|
||||
# Set password if provided
|
||||
if form.new_password.data:
|
||||
@@ -159,7 +158,6 @@ def edit_profile():
|
||||
form.company.data = current_user.company
|
||||
form.position.data = current_user.position
|
||||
form.notes.data = current_user.notes
|
||||
form.is_active.data = current_user.is_active
|
||||
form.is_admin.data = current_user.is_admin
|
||||
|
||||
return render_template('contacts/form.html', form=form, title='Edit Profile', total_admins=total_admins)
|
||||
@@ -180,7 +178,6 @@ def edit_contact(id):
|
||||
form.company.data = user.company
|
||||
form.position.data = user.position
|
||||
form.notes.data = user.notes
|
||||
form.is_active.data = user.is_active
|
||||
form.is_admin.data = user.is_admin
|
||||
if form.validate_on_submit():
|
||||
# Handle profile picture removal
|
||||
@@ -225,7 +222,6 @@ def edit_contact(id):
|
||||
user.company = form.company.data
|
||||
user.position = form.position.data
|
||||
user.notes = form.notes.data
|
||||
user.is_active = form.is_active.data
|
||||
user.is_admin = form.is_admin.data
|
||||
# Set password if provided
|
||||
if form.new_password.data:
|
||||
|
||||
Reference in New Issue
Block a user