From 13ef60c4e336e1e08a42c666a825928842d036cc Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Wed, 12 Jun 2024 16:13:29 -0300 Subject: [PATCH] refactor: Remove unused code in update_template_field function Remove the unused code block in the update_template_field function in utils.py. The code block was checking for the "load_from_db" key in the value_dict and assigning it to the "load_from_db" attribute of the template_field dictionary. However, this attribute is no longer used in the codebase, so the code block can be safely removed. This change improves the clarity and maintainability of the code. --- src/backend/base/langflow/api/utils.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/backend/base/langflow/api/utils.py b/src/backend/base/langflow/api/utils.py index 82bd32165..4cc4aa7f2 100644 --- a/src/backend/base/langflow/api/utils.py +++ b/src/backend/base/langflow/api/utils.py @@ -129,9 +129,6 @@ 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."""