From: Guillaume Pellerin Date: Mon, 13 Jul 2026 22:01:25 +0000 (+0200) Subject: force delete file X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=f3d0ab45dc7b392007e5f7584632574c13222f37;p=teleforma.git force delete file --- diff --git a/teleforma/management/commands/teleforma-delete-year-private-documents.py b/teleforma/management/commands/teleforma-delete-year-private-documents.py index 8bea5fed..defd373b 100644 --- a/teleforma/management/commands/teleforma-delete-year-private-documents.py +++ b/teleforma/management/commands/teleforma-delete-year-private-documents.py @@ -21,5 +21,6 @@ class Command(BaseCommand): date = datetime.datetime(day=31, month=12, year=year) docs = DocumentPrivate.objects.filter(date_added__lte=date) for doc in docs: + doc.file.delete(save=False) doc.delete() \ No newline at end of file