Skip to content

Commit 6a9c642

Browse files
committed
@sanderegg remove validator
1 parent 94b37ec commit 6a9c642

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

packages/models-library/src/models_library/api_schemas_storage/zipping_tasks.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,11 @@
22
from pathlib import Path
33

44
from models_library.api_schemas_long_running_tasks.base import TaskId
5-
from pydantic import BaseModel, model_validator
5+
from pydantic import BaseModel, Field
66

77

88
class ZipTaskStartInput(BaseModel):
9-
paths: list[Path]
10-
11-
@model_validator(mode="after")
12-
def _check_paths(self, value):
13-
if not value:
14-
raise ValueError("Empty paths error")
15-
return value
9+
paths: list[Path] = Field(..., min_length=1)
1610

1711

1812
class ZipTaskAbortOutput(BaseModel):

0 commit comments

Comments
 (0)