We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3ee7e6 commit fde9a06Copy full SHA for fde9a06
1 file changed
backend/app/schemas/album.py
@@ -49,6 +49,19 @@ class GetAlbumImagesRequest(BaseModel):
49
class ImageIdsRequest(BaseModel):
50
image_ids: List[str]
51
52
+ @field_validator("image_ids")
53
+ def validate_image_ids(cls, value: List[str]) -> List[str]:
54
+ if not value:
55
+ raise ValueError("image_ids cannot be empty")
56
+
57
+ cleaned = []
58
+ for img_id in value:
59
+ if not img_id or not img_id.strip():
60
+ raise ValueError("image_ids must not contain empty values")
61
+ cleaned.append(img_id.strip())
62
63
+ return cleaned
64
65
66
# ##############################
67
# Response Handler
0 commit comments