fix: ensure Performance Tracing button visible when no tracing provid… (#25351)

This commit is contained in:
Krito.
2025-09-08 16:38:09 +08:00
committed by GitHub
parent 57f1822213
commit 74be2087b5

View File

@@ -323,14 +323,11 @@ class OpsTraceManager:
:return:
"""
# auth check
if enabled:
try:
try:
if enabled or tracing_provider is not None:
provider_config_map[tracing_provider]
except KeyError:
raise ValueError(f"Invalid tracing provider: {tracing_provider}")
else:
if tracing_provider is None:
raise ValueError(f"Invalid tracing provider: {tracing_provider}")
except KeyError:
raise ValueError(f"Invalid tracing provider: {tracing_provider}")
app_config: Optional[App] = db.session.query(App).where(App.id == app_id).first()
if not app_config: