Explorar el Código

Update the provider_id validation to fix the error message displayed … (#15466)

Co-authored-by: Kyle Chang <kylechang@91app.com>
Yu Chun Chang hace 1 mes
padre
commit
6d172498d1
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      api/models/model.py

+ 1 - 1
api/models/model.py

@@ -257,7 +257,7 @@ class App(Base):
                 provider_id = tool.get("provider_id", "")
 
                 if provider_type == ToolProviderType.API.value:
-                    if provider_id not in existing_api_providers:
+                    if uuid.UUID(provider_id) not in existing_api_providers:
                         deleted_tools.append(
                             {
                                 "type": ToolProviderType.API.value,