diff --git a/src/backend/langflow/__main__.py b/src/backend/langflow/__main__.py index 543c59f32..7e7fa076b 100644 --- a/src/backend/langflow/__main__.py +++ b/src/backend/langflow/__main__.py @@ -1,6 +1,7 @@ import multiprocessing import platform from pathlib import Path +from typing import Optional import typer from fastapi.staticfiles import StaticFiles @@ -18,7 +19,7 @@ def get_number_of_workers(workers=None): return workers -def update_settings(config: str, dev: bool = False, database_url: str = None): +def update_settings(config: str, dev: bool = False, database_url: Optional[str] = None): """Update the settings from a config file.""" if config: settings.update_from_yaml(config, dev=dev) diff --git a/src/backend/langflow/template/frontend_node/llms.py b/src/backend/langflow/template/frontend_node/llms.py index 39e82422f..c2aedb45e 100644 --- a/src/backend/langflow/template/frontend_node/llms.py +++ b/src/backend/langflow/template/frontend_node/llms.py @@ -66,5 +66,5 @@ class LLMFrontendNode(FrontendNode): field.show = True LLMFrontendNode.format_openai_field(field) - if "azure" in name.lower(): + if name and "azure" in name.lower(): LLMFrontendNode.format_azure_field(field) diff --git a/tests/test_database.py b/tests/test_database.py index e4ba26387..8b680129f 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -299,9 +299,9 @@ def test_update_flow_style(client: TestClient): flow_style = FlowStyleCreate(color="red", emoji="🔴") response = client.post("api/v1/flow_styles/", json=flow_style.dict()) created_flow_style = FlowStyleRead(**response.json()) - updated_flow_style = FlowStyleUpdate(color="blue") + to_update_flow_style = FlowStyleUpdate(color="blue") response = client.patch( - f"api/v1/flow_styles/{created_flow_style.id}", json=updated_flow_style.dict() + f"api/v1/flow_styles/{created_flow_style.id}", json=to_update_flow_style.dict() ) assert response.status_code == 200 updated_flow_style = FlowStyleRead(**response.json())