mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-07-12 22:23:01 +02:00
Strict Tenant ID Enforcement (#3871)
* strict tenant id enforcement * k * k * nit * merge * nit * k
This commit is contained in:
@ -107,7 +107,7 @@ class OnyxLoggingAdapter(logging.LoggerAdapter):
|
||||
# This will always be the case for authenticated API requests
|
||||
if MULTI_TENANT:
|
||||
tenant_id = CURRENT_TENANT_ID_CONTEXTVAR.get()
|
||||
if tenant_id != POSTGRES_DEFAULT_SCHEMA:
|
||||
if tenant_id != POSTGRES_DEFAULT_SCHEMA and tenant_id is not None:
|
||||
# Strip tenant_ prefix and take first 8 chars for cleaner logs
|
||||
tenant_display = tenant_id.removeprefix(TENANT_ID_PREFIX)
|
||||
short_tenant = (
|
||||
|
Reference in New Issue
Block a user