fix create_tracing_app_config error (#19884)

This commit is contained in:
heyszt
2025-05-19 10:09:21 +08:00
committed by GitHub
parent 499392c6f9
commit 11146b6bae
2 changed files with 9 additions and 3 deletions

View File

@@ -287,7 +287,9 @@ class OpsTraceManager:
:return:
"""
# auth check
if tracing_provider not in provider_config_map and tracing_provider is not None:
try:
provider_config_map[tracing_provider]
except KeyError:
raise ValueError(f"Invalid tracing provider: {tracing_provider}")
app_config: Optional[App] = db.session.query(App).filter(App.id == app_id).first()