mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-30 19:31:25 +00:00
Fix review issues: tags validation, size nullability, type annotation, hash mismatch check, and add tag histogram tests
- Remove contradictory min_length=1 from CreateFromHashBody.tags default - Restore size field to int|None=None for proper null semantics - Add Union type annotation to _build_asset_response result param - Add hash mismatch validation on idempotent upload path (409 HASH_MISMATCH) - Add unit tests for list_tag_histogram service function Amp-Thread-ID: https://ampcode.com/threads/T-019cd993-f43c-704e-b3d7-6cfc3d4d4a80 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -121,7 +121,7 @@ class CreateFromHashBody(BaseModel):
|
||||
|
||||
hash: str
|
||||
name: str | None = None
|
||||
tags: list[str] = Field(default_factory=list, min_length=1)
|
||||
tags: list[str] = Field(default_factory=list)
|
||||
user_metadata: dict[str, Any] = Field(default_factory=dict)
|
||||
mime_type: str | None = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user