Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: when create provider credential set the provider record to vaild (#26868)

非法操作7b5132034678
diff --git a/api/core/entities/provider_configuration.py b/api/core/entities/provider_configuration.py
index 29b8f8f610c..b0699558367 100644
--- a/api/core/entities/provider_configuration.py
+++ b/api/core/entities/provider_configuration.py
@@ -472,6 +472,9 @@ class ProviderConfiguration(BaseModel):
provider_model_credentials_cache.delete()
self.switch_preferred_provider_type(provider_type=ProviderType.CUSTOM, session=session)
+ else:
+ # some historical data may have a provider record but not be set as valid
+ provider_record.is_valid = True
session.commit()
except Exception: