ComfyUI/app/assets/api
Luke Mino-Altherr 3fc22e31c3 Fix inconsistent nullability handling for size_bytes in routes.py
Since size_bytes is declared as non-nullable (nullable=False, default=0) in
the Asset model, simplify the conditional checks:
- Use 'if item.asset else None' when the asset relationship might be None
- Access size_bytes directly when asset is guaranteed to exist (create endpoints)

Amp-Thread-ID: https://ampcode.com/threads/T-019c354e-cbfb-77d8-acdd-0d066c16006e
Co-authored-by: Amp <amp@ampcode.com>
2026-02-24 11:34:44 -08:00
..
routes.py Fix inconsistent nullability handling for size_bytes in routes.py 2026-02-24 11:34:44 -08:00
schemas_in.py refactor(assets): consolidate duplicated query utilities and remove unused code 2026-02-24 11:34:44 -08:00
schemas_out.py refactor: rename functions to verb-based naming convention 2026-02-24 11:34:44 -08:00
upload.py Fix type annotation: use Callable[[str], bool] instead of callable 2026-02-24 11:34:44 -08:00