mirror of
https://github.com/langgenius/dify.git
synced 2026-04-28 20:17:29 +08:00
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]:
|
def credentials(self) -> dict[str, Any]:
|
||||||
if not self.encrypted_credentials:
|
if not self.encrypted_credentials:
|
||||||
return {}
|
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):
|
class ApiToolProvider(TypeBase):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user