- Drop 'or PNG' fallback: img.format is always set after a successful PillowImage.open() call; UnidentifiedImageError fires before returning None. - Add extension/content consistency check using PillowImage.MIME to catch mismatches like PNG data with a .jpg extension (content-type drift). - AVIF/JPEG2000: raise a specific ValidationError when save() fails due to a missing native codec library, replacing the generic 'unable to process' message that was a silent regression from the previous store-as-is behaviour. - Animated WebP: extend the ImageSequence frame-preservation path to WebP (n_frames > 1) alongside GIF. - Hoist ImageSequence import to module level; split PIL imports onto separate lines per ruff isort requirement. - Tests: use img.n_frames instead of manual seek loop; add animated WebP test; add comment explaining why test_clean_rejects_disallowed_extension calls clean() directly rather than full_clean(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| account | ||
| circuits | ||
| core | ||
| dcim | ||
| extras | ||
| ipam | ||
| media | ||
| netbox | ||
| project-static | ||
| reports | ||
| scripts | ||
| templates | ||
| tenancy | ||
| translations | ||
| users | ||
| utilities | ||
| virtualization | ||
| vpn | ||
| wireless | ||
| generate_secret_key.py | ||
| manage.py | ||
| release.yaml | ||