Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#29319 closed Bug (invalid)

post_delete signals is sent before objects are deleted

Reported by: Nicolas Ippolito Owned by: nobody
Component: Database layer (models, ORM) Version: 2.0
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

https://github.com/django/django/blob/ee17bb8a67a9e7e688da6e6f4b3be1b3a69c09b0/django/db/models/deletion.py#L305

The post_delete signals is sent before objects are really deleted. For exemple, for "Document" objects, the file is not yet removed in the file system...

Change History (3)

comment:1 by Simon Charette, 6 years ago

Resolution: invalid
Status: newclosed

The post_delete signals is sent before objects are really deleted.

The post_delete signal is correctly sent once the objects are deleted from the database.

For exemple, for "Document" objects, the file is not yet removed in the file system...

Django hasn't been deleting files referenced by FileField on model deletion since Django 1.3.

Please re-open with more details if I missed something.

comment:2 by Tim Graham, 6 years ago

Summary: post_delete signals ispost_delete signals is sent before objects are deleted

comment:3 by Nicolas Ippolito, 6 years ago

Thanks!

Note: See TracTickets for help on using tickets.
Back to Top