]> git.parisson.com Git - teleforma.git/commitdiff
force delete file
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Mon, 13 Jul 2026 22:01:25 +0000 (00:01 +0200)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Mon, 13 Jul 2026 22:01:25 +0000 (00:01 +0200)
teleforma/management/commands/teleforma-delete-year-private-documents.py

index 8bea5fed129981a72282751a28827def697cdf88..defd373b04ad0aa78aa9ab73ce73815aad5dcc8a 100644 (file)
@@ -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