From 422584d80a220921db322fdf94e54014d27d40ba Mon Sep 17 00:00:00 2001 From: Ken Lui <116421546+kenlhlui@users.noreply.github.com> Date: Wed, 16 Apr 2025 14:35:30 -0400 Subject: [PATCH] Allow passing `None` to categories (tags) when uploading files. --- dvuploader/file.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dvuploader/file.py b/dvuploader/file.py index dbd7c7a..a43edb0 100644 --- a/dvuploader/file.py +++ b/dvuploader/file.py @@ -18,7 +18,7 @@ class File(BaseModel): description (str): The description of the file. directory_label (str): The label of the directory where the file is stored. mimeType (str): The MIME type of the file. - categories (List[str]): The categories associated with the file. + categories (Optional[List[str]]): The categories associated with the file. restrict (bool): Indicates if the file is restricted. checksum_type (ChecksumTypes): The type of checksum used for the file. storageIdentifier (Optional[str]): The identifier of the storage where the file is stored. @@ -46,7 +46,7 @@ class File(BaseModel): description: str = "" directory_label: str = Field(default="", alias="directoryLabel") mimeType: str = "application/octet-stream" - categories: List[str] = ["DATA"] + categories: Optional[List[str]] = ["DATA"] restrict: bool = False checksum_type: ChecksumTypes = Field(default=ChecksumTypes.MD5, exclude=True) storageIdentifier: Optional[str] = None