From fa9a3a210b724db7c82b60d04ecfedd7095dbbd8 Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Sat, 27 May 2023 23:39:05 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(base.py):=20change=20conditi?= =?UTF-8?q?on=20to=20check=20if=20content=20is=20empty=20instead=20of=20No?= =?UTF-8?q?ne=20The=20previous=20condition=20was=20checking=20if=20the=20c?= =?UTF-8?q?ontent=20was=20None,=20but=20it=20should=20check=20if=20it=20is?= =?UTF-8?q?=20empty.=20This=20change=20fixes=20the=20error=20message=20to?= =?UTF-8?q?=20be=20more=20accurate.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/cache/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/langflow/cache/base.py b/src/backend/langflow/cache/base.py index 1f2039b27..0f1ff5d92 100644 --- a/src/backend/langflow/cache/base.py +++ b/src/backend/langflow/cache/base.py @@ -120,7 +120,7 @@ def save_binary_file(content: str, file_name: str, accepted_types: list[str]) -> # Get the destination folder cache_path = Path(tempfile.gettempdir()) / PREFIX - if content is None: + if not content: raise ValueError("Please, reload the file in the loader.") data = content.split(",")[1] decoded_bytes = base64.b64decode(data)