Opened 7 years ago

Closed 7 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 7 years ago by mtredinnick

  • milestone set to 1.1
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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 7 years ago by Alex

  • Component changed from Uncategorized to File uploads/storage

comment:3 Changed 7 years ago by Gulopine

  • Resolution set to duplicate
  • Status changed from new to closed

This is a duplicate of #6456

comment:4 Changed 5 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

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