mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-15 17:25:26 -04:00
f28703adf6
delete_gallery_image() deleted the on-disk file before setting is_active=False and committing. If that commit failed and rolled back, the record stayed active but its file was already gone — a broken, unviewable image (data loss). Soft-delete and commit first, then remove the file best-effort, so a missing or locked file can no longer 500 a delete that already succeeded logically. Adds tests/test_gallery_delete_file_ordering.py covering the commit-failure (file kept) and success (file removed) paths.