- Problem editing user model (Boolean values not set)
This commit is contained in:
@@ -24,6 +24,7 @@ class Database:
|
||||
"""
|
||||
schema = session.info.get("tenant_schema")
|
||||
if schema:
|
||||
current_app.logger.debug(f"DBCTX tx_begin schema={schema}")
|
||||
try:
|
||||
connection.exec_driver_sql(f'SET LOCAL search_path TO "{schema}", public')
|
||||
# Optional visibility/logging for debugging
|
||||
|
||||
@@ -35,7 +35,8 @@ def is_valid_tenant(tenant_id):
|
||||
if tenant_id == 1: # The 'root' tenant, is always valid
|
||||
return True
|
||||
tenant = Tenant.query.get(tenant_id)
|
||||
Database(tenant).switch_schema()
|
||||
# Use the tenant_id (schema name), not the Tenant object, to switch schema
|
||||
Database(tenant_id).switch_schema()
|
||||
if tenant is None:
|
||||
raise EveAITenantNotFound()
|
||||
elif tenant.type == 'Inactive':
|
||||
|
||||
Reference in New Issue
Block a user