Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#10576 closed (duplicate)

file lost when transaction was rollbacked

Reported by: liangent Owned by: nobody
Component: File uploads/storage Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


create a model with a FileField, start a transaction, delete an object of this model, although the record in database is kept, the file is lost.

i think django should delete files in FileFields only when the transaction was committed successfully.

Change History (4)

comment:1 Changed 8 years ago by Malcolm Tredinnick

milestone: 1.1
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

This could be tricky to organise, but I'm inclined to agree with the idea. Having the database refer to something which doesn't exist is bad. Nice catch. :-)

comment:2 Changed 8 years ago by Alex Gaynor

Component: UncategorizedFile uploads/storage

comment:3 Changed 8 years ago by Marty Alchin

Resolution: duplicate
Status: newclosed

This is a duplicate of #6456

comment:4 Changed 5 years ago by Jacob

milestone: 1.1

Milestone 1.1 deleted

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