mirror of
https://github.com/langgenius/dify.git
synced 2026-03-20 22:17:58 +08:00
When a plugin is uninstalled, the Provider record remains in the database with credential_id set to None while ProviderCredential rows are deleted. Upon reinstalling the plugin and adding a new API key, the existing Provider record causes the code to skip credential activation, leaving the new key in an unusable state. Now when creating a credential and the Provider record already exists with credential_id=None, the new credential is automatically activated. Made-with: Cursor