- Problem adding documents

This commit is contained in:
Josako
2025-11-18 11:14:49 +01:00
parent 78043ab3ef
commit f2604db5a9
5 changed files with 113 additions and 14 deletions

View File

@@ -571,10 +571,12 @@ def delete_tenant_project(tenant_project_id):
@roles_accepted('Super User', 'Partner Admin', 'Tenant Admin')
def tenant_make():
form = TenantMakeForm()
customisation_config = cache_manager.customisations_config_cache.get_config("CHAT_CLIENT_CUSTOMISATION")
default_customisation_options = create_default_config_from_type_config(customisation_config["configuration"])
current_app.logger.debug(f"ìn tenant_make view")
# customisation_config = cache_manager.customisations_config_cache.get_config("CHAT_CLIENT_CUSTOMISATION")
# default_customisation_options = create_default_config_from_type_config(customisation_config["configuration"])
if form.validate_on_submit():
current_app.logger.debug(f"in tenant_make form validate")
tenant_id = session['tenant']['id']
new_tenant_make = TenantMake()
form.populate_obj(new_tenant_make)
@@ -596,6 +598,8 @@ def tenant_make():
flash(f'Failed to add Tenant Make. Error: {e}', 'danger')
current_app.logger.error(f'Failed to add Tenant Make {new_tenant_make.name}'
f'for tenant {tenant_id}. Error: {str(e)}')
else:
flash('Please fill in all required fields.', 'information')
return render_template('user/tenant_make.html', form=form)