diff --git a/src/backend/langflow/template/frontend_node/utilities.py b/src/backend/langflow/template/frontend_node/utilities.py index 77d01a23e..615d7d12f 100644 --- a/src/backend/langflow/template/frontend_node/utilities.py +++ b/src/backend/langflow/template/frontend_node/utilities.py @@ -1,3 +1,4 @@ +import ast import json from typing import Optional @@ -12,7 +13,7 @@ class UtilitiesFrontendNode(FrontendNode): # field.field_type could be "Literal['news', 'search', 'places', 'images'] # we need to convert it to a list if "Literal" in field.field_type: - field.options = eval(field.field_type.replace("Literal", "")) + field.options = ast.literal_eval(field.field_type.replace("Literal", "")) field.is_list = True field.field_type = "str" diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index 3409f8d9e..1427d1a76 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -85,7 +85,7 @@ export default function GenericNode({ deleteNode(data.id); return; } - console.log(data) + console.log(data); return (