fix: use correct json load method when loading flow from file (#5936)
load json from string instead of file
This commit is contained in:
parent
2d3bfbc6fb
commit
6aa4f9cc6a
1 changed files with 1 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ async def aload_flow_from_json(
|
||||||
if isinstance(flow, str | Path):
|
if isinstance(flow, str | Path):
|
||||||
async with async_open(Path(flow).name, encoding="utf-8") as f:
|
async with async_open(Path(flow).name, encoding="utf-8") as f:
|
||||||
content = await f.read()
|
content = await f.read()
|
||||||
flow_graph = json.load(content)
|
flow_graph = json.loads(content)
|
||||||
# If input is a dictionary, assume it's a JSON object
|
# If input is a dictionary, assume it's a JSON object
|
||||||
elif isinstance(flow, dict):
|
elif isinstance(flow, dict):
|
||||||
flow_graph = flow
|
flow_graph = flow
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue