- Corrections to tenant, catalog, and tenant_make

- Clean-up of tenant elements
- ensure the chat_client get's it's initial call rifht.
This commit is contained in:
Josako
2025-06-10 16:10:08 +02:00
parent 3f77871c4f
commit 9cc266b97f
13 changed files with 182 additions and 38 deletions

View File

@@ -705,6 +705,14 @@ def specialist_magic_link():
new_spec_ml_tenant.magic_link_code = new_specialist_magic_link.magic_link_code
new_spec_ml_tenant.tenant_id = tenant_id
# Define the make valid for this magic link
make_id = SpecialistServices.get_specialist_system_field(new_specialist_magic_link.id,
"make", "tenant_make")
if make_id:
new_spec_ml_tenant.tenant_make_id = make_id
elif session.get('tenant').get('default_tenant_make_id'):
new_spec_ml_tenant.tenant_make_id = session.get('tenant').get('default_tenant_make_id')
db.session.add(new_specialist_magic_link)
db.session.add(new_spec_ml_tenant)