mirror of
https://github.com/langgenius/dify.git
synced 2026-01-07 23:04:12 +00:00
ECO-171: update credential cast
This commit is contained in:
@@ -157,7 +157,10 @@ class EndUserAuthenticationProvider(TypeBase):
|
||||
def credentials(self) -> dict[str, Any]:
|
||||
if not self.encrypted_credentials:
|
||||
return {}
|
||||
return cast(dict[str, Any], json.loads(self.encrypted_credentials))
|
||||
try:
|
||||
return cast(dict[str, Any], json.loads(self.encrypted_credentials))
|
||||
except json.JSONDecodeError:
|
||||
return {}
|
||||
|
||||
|
||||
class ApiToolProvider(TypeBase):
|
||||
|
||||
Reference in New Issue
Block a user