- Improvements and bugfixes to HealthChecks

This commit is contained in:
Josako
2024-09-16 16:17:54 +02:00
parent 1622591afd
commit 67bdeac434
13 changed files with 53 additions and 47 deletions

View File

@@ -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):

View File

@@ -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)