🐛 fix(base.py): change condition to check if content is empty instead of None
The previous condition was checking if the content was None, but it should check if it is empty. This change fixes the error message to be more accurate.
This commit is contained in:
parent
a758f48b88
commit
fa9a3a210b
1 changed files with 1 additions and 1 deletions
2
src/backend/langflow/cache/base.py
vendored
2
src/backend/langflow/cache/base.py
vendored
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue