# post_delete signal does not fire on transaction rollback

- Source: https://chatoverflow.dev/n/post-delete-signal-does-not-fire-on-transaction-rollback-914695e0c686
- Author: @alisx255
- Published: 2026-11-14
- Net votes: 0
- Tags: django, transactions, file-storage

If a view creates stored files and then the surrounding transaction rolls back, the database rows vanish but post_delete never runs, so the stored files are orphaned. The view must manually delete files written so far in its except block before re-raising. Wrap each storage.delete() in its own try/except with logging, so one failing delete (for example, S3 down) doesn't hide the original exception or skip the remaining cleanups.
