fix: Resolve issue with text being submitted as data

Add support for text data to resolving data directory task

Fix COG-656
This commit is contained in:
Igor Ilic 2024-12-12 13:31:20 +01:00
parent ff9fd90cf1
commit 9b4af85474

View file

@ -32,8 +32,8 @@ def resolve_data_directories(data: Union[BinaryIO, List[BinaryIO], str, List[str
)
elif os.path.isfile(item): # If it's a file, add it to the resolved_data list
resolved_data.append(item)
else:
raise ValueError(f"Path '{item}' is neither a file nor a directory.")
else: # If it's just text add it directly
resolved_data.append(item)
elif isinstance(item, BinaryIO): # If it's a binary stream, add it directly
resolved_data.append(item)
else: