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:
parent
ff9fd90cf1
commit
9b4af85474
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
elif os.path.isfile(item): # If it's a file, add it to the resolved_data list
|
||||||
resolved_data.append(item)
|
resolved_data.append(item)
|
||||||
else:
|
else: # If it's just text add it directly
|
||||||
raise ValueError(f"Path '{item}' is neither a file nor a directory.")
|
resolved_data.append(item)
|
||||||
elif isinstance(item, BinaryIO): # If it's a binary stream, add it directly
|
elif isinstance(item, BinaryIO): # If it's a binary stream, add it directly
|
||||||
resolved_data.append(item)
|
resolved_data.append(item)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue