fix: error parsing object type parameters for code node (#22230)
This commit is contained in:
parent
d9eb5554b3
commit
1d54ffcf89
1 changed files with 3 additions and 1 deletions
|
|
@ -5,6 +5,8 @@ from base64 import b64encode
|
|||
from collections.abc import Mapping
|
||||
from typing import Any
|
||||
|
||||
from core.variables.utils import SegmentJSONEncoder
|
||||
|
||||
|
||||
class TemplateTransformer(ABC):
|
||||
_code_placeholder: str = "{{code}}"
|
||||
|
|
@ -95,7 +97,7 @@ class TemplateTransformer(ABC):
|
|||
|
||||
@classmethod
|
||||
def serialize_inputs(cls, inputs: Mapping[str, Any]) -> str:
|
||||
inputs_json_str = json.dumps(inputs, ensure_ascii=False).encode()
|
||||
inputs_json_str = json.dumps(inputs, ensure_ascii=False, cls=SegmentJSONEncoder).encode()
|
||||
input_base64_encoded = b64encode(inputs_json_str).decode("utf-8")
|
||||
return input_base64_encoded
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue