ComfyUI/app
Matt Miller 54c92d0462 Add clear_preview_id flag + validation to UpdateAsset
Replaces #13744 with a narrower change. Decision after review: drop the
dedicated PUT/DELETE /api/assets/{id}/preview endpoints in favor of
extending the existing PUT /api/assets/{id} route with a clear_preview_id
flag, matching the codebase's existing pattern for clearing operations
elsewhere in the project (`clear: true` on /api/queue and /api/history in
the cloud sibling).

Changes:
- openapi.yaml: add `clear_preview_id: boolean` to the UpdateAsset request
  body, documented as taking precedence over `preview_id` when both are set.
- schemas_in.UpdateAssetBody: add the field, extend at-least-one-field
  validation (clear=true counts, clear=false is a no-op), reject the zero
  UUID as `preview_id`.
- services/asset_management.update_asset_metadata: add `clear_preview_id`
  param; when true, call set_reference_preview with None to clear the link.
  Clear takes precedence over set when both provided.
- routes.update_asset_route: wire the flag through. Reject self-referential
  preview_id (preview_id == path id) at 400 SELF_REFERENCE before service
  call.
- Tests: cover clear-via-flag happy path, clear-takes-precedence, schema
  validation edge cases (zero UUID rejected, clear-only valid, false-only
  rejected).
2026-05-20 13:56:26 -07:00
..
assets Add clear_preview_id flag + validation to UpdateAsset 2026-05-20 13:56:26 -07:00
database feat(assets): align local API with cloud spec (#12863) 2026-03-16 12:34:04 -07:00
__init__.py Add FrontendManager to manage non-default front-end impl (#3897) 2024-07-16 11:26:11 -04:00
app_settings.py Update frontend to v1.25.10 and revert navigation mode override (#9522) 2025-08-23 17:54:01 -04:00
custom_node_manager.py This should not be a warning. (#7946) 2025-05-05 07:49:07 -04:00
frontend_management.py Generalize frontend version warning to all comfy* requirements.txt entries (#13875) 2026-05-14 16:13:30 -07:00
logger.py Repeat frontend version warning at the end. 2025-03-12 07:13:40 -04:00
model_manager.py New Year ruff cleanup. (#11595) 2026-01-01 22:06:14 -05:00
node_replace_manager.py fix: make NodeReplaceManager.register() idempotent (#13596) 2026-05-07 19:21:12 -07:00
subgraph_manager.py fix: specify UTF-8 encoding when reading subgraph files (#12563) 2026-02-21 15:05:00 -08:00
user_manager.py fix: return millisecond timestamps from get_file_info() (#12996) 2026-05-06 10:56:09 +08:00