mirror of
https://github.com/langgenius/dify.git
synced 2026-08-28 19:06:51 +08:00
fix bug
This commit is contained in:
parent
02852ee543
commit
9d75d3d04c
@ -198,8 +198,12 @@ class ProviderConfiguration(BaseModel):
|
||||
"""
|
||||
if not self.is_custom_configuration_available():
|
||||
return CustomConfigurationStatus.NO_CONFIGURE
|
||||
elif self.custom_configuration.provider.current_credential_status:
|
||||
return self.custom_configuration.provider.current_credential_status
|
||||
|
||||
provider = self.custom_configuration.provider
|
||||
if provider and hasattr(provider, "current_credential_status"):
|
||||
status = provider.current_credential_status
|
||||
if status:
|
||||
return status
|
||||
|
||||
return CustomConfigurationStatus.ACTIVE
|
||||
|
||||
|
||||
@ -41,6 +41,7 @@ class ProviderQuotaType(Enum):
|
||||
return member
|
||||
raise ValueError(f"No matching enum found for value '{value}'")
|
||||
|
||||
|
||||
class CredentialStatus(StrEnum):
|
||||
ACTIVE = "active"
|
||||
CANCELED = "canceled"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user