From 0175fc4b06b51c6579520e0fcc3c70b427abfd52 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Tue, 26 Mar 2024 13:49:39 -0300 Subject: [PATCH] Add support for loading template field from the database --- src/backend/langflow/api/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/langflow/api/utils.py b/src/backend/langflow/api/utils.py index d576db952..c03a724a7 100644 --- a/src/backend/langflow/api/utils.py +++ b/src/backend/langflow/api/utils.py @@ -125,6 +125,9 @@ def update_template_field(frontend_template, key, value_dict): template_field["value"] = "" template_field["file_path"] = file_path_value + if "load_from_db" in value_dict and value_dict["load_from_db"]: + template_field["load_from_db"] = value_dict["load_from_db"] + def get_file_path_value(file_path): """Get the file path value if the file exists, else return empty string."""