Actions
Backport #8757
closedbackport 7316 to 3.11: Files are not being deleted from storage when calling the method delete()
Start date:
Due date:
% Done:
100%
Estimated time:
Triaged:
Yes
Sprint Candidate:
No
Tags:
Katello
Sprint:
Sprint 97
Quarter:
Related issues
Actions
Fixes deletion of UploadChunk when Upload deletes
According to the Django docs, the
on_delete=models.CASCADE
option does not call Model.delete(), but it does call the Model.post_delete() signal handler.This replaces the
UploadChunk.delete()
with anUploadChunk.post_delete()
signal handler which correctly handles theUploadChunk.file
file deletion.backports #7316
fixes #8757
(cherry picked from commit b38df5ff05e4f1095f6c35847ce843fc5123cdfe)