mirror of https://github.com/langgenius/dify.git
fix: when create provider credential set the provider record to vaild (#26868)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
9e39be0770
commit
7b51320346
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue