manage.py delete_unused_files leaves UploadedFile instance
sebhaase opened this issue · 3 comments
sebhaase commented
The last step in my FileFormMixin.save()
is to call self.delete_temporary_files()
which removes the duplicate file copy in temp_uploads
and deletes the corresponding UploadedFile
instance.
When I comment that line out and call instead manage.py delete_unused_files
from the Linux command line,
it also removes that same file in the file system but it leaves the UploadedFile
instance pointing to a non existing file.
mbraak commented
I will have a look.
mbraak commented
This is being fixed: #395.
Note that the delete_unused_files
command should delete records that are created at least one day ago.
mbraak commented
This is now fixed in master.