mirror of https://github.com/langgenius/dify.git
fix: type errors
Signed-off-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
parent
2a97a69825
commit
9cf2b2b231
|
|
@ -11,7 +11,9 @@ from core.variables import Segment
|
|||
class WorkflowRuntimeTypeConverter:
|
||||
def to_json_encodable(self, value: Mapping[str, Any] | None) -> Mapping[str, Any] | None:
|
||||
result = self._to_json_encodable_recursive(value)
|
||||
return result if isinstance(result, Mapping) or result is None else dict(result)
|
||||
if isinstance(result, Mapping) or result is None:
|
||||
return result
|
||||
return {}
|
||||
|
||||
def _to_json_encodable_recursive(self, value: Any):
|
||||
if value is None:
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
"core/ops",
|
||||
"core/tools",
|
||||
"core/model_runtime",
|
||||
"core/workflow",
|
||||
"core/workflow/nodes",
|
||||
"core/app/app_config/easy_ui_based_app/dataset"
|
||||
],
|
||||
"typeCheckingMode": "strict",
|
||||
|
|
|
|||
Loading…
Reference in New Issue