mirror of https://github.com/langgenius/dify.git
ECO-171: update credential cast
This commit is contained in:
parent
4590dab046
commit
cf2457a03c
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in New Issue