- Improvements and bugfixes to HealthChecks
This commit is contained in:
@@ -67,7 +67,7 @@ class TenantForm(FlaskForm):
|
||||
# Initialize fallback algorithms
|
||||
self.fallback_algorithms.choices = \
|
||||
[(algorithm, algorithm.lower()) for algorithm in current_app.config['FALLBACK_ALGORITHMS']]
|
||||
self.type.choices = [('', 'Select Type')] + [(t, t) for t in current_app.config['TENANT_TYPES']]
|
||||
self.type.choices = [(t, t) for t in current_app.config['TENANT_TYPES']]
|
||||
|
||||
|
||||
class BaseUserForm(FlaskForm):
|
||||
|
||||
@@ -129,6 +129,7 @@ def edit_tenant(tenant_id):
|
||||
form.html_excluded_classes.data = ', '.join(tenant.html_excluded_classes)
|
||||
|
||||
if form.validate_on_submit():
|
||||
current_app.logger.debug(f'Updating tenant {tenant_id}')
|
||||
# Populate the tenant with form data
|
||||
form.populate_obj(tenant)
|
||||
# Then handle the special fields manually
|
||||
@@ -148,6 +149,7 @@ def edit_tenant(tenant_id):
|
||||
session['tenant'] = tenant.to_dict()
|
||||
# return redirect(url_for(f"user/tenant/tenant_id"))
|
||||
else:
|
||||
current_app.logger.debug(f'Tenant update failed with errors: {form.errors}')
|
||||
form_validation_failed(request, form)
|
||||
|
||||
return render_template('user/edit_tenant.html', form=form, tenant_id=tenant_id)
|
||||
|
||||
Reference in New Issue
Block a user