mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-02 11:45:17 +02:00
added-fix-image-deletion (#681)
* added-fix-image-deletion * feat(commands): add image cleanup command to find and delete unused files * fix(models): ensure associated AdventureImages are deleted and files cleaned up on Adventure deletion * fix(models): ensure associated Attachment files are deleted and their filesystem cleaned up on Adventure deletion --------- Co-authored-by: ferdousahmed <taninme@gmail.com> Co-authored-by: Sean Morley
This commit is contained in:
parent
295ecd1362
commit
5308ec21d6
3 changed files with 115 additions and 1 deletions
|
@ -9,6 +9,7 @@ from adventures.serializers import AdventureImageSerializer
|
|||
from integrations.models import ImmichIntegration
|
||||
import uuid
|
||||
import requests
|
||||
import os
|
||||
|
||||
class AdventureImageViewSet(viewsets.ModelViewSet):
|
||||
serializer_class = AdventureImageSerializer
|
||||
|
@ -155,7 +156,6 @@ class AdventureImageViewSet(viewsets.ModelViewSet):
|
|||
return super().update(request, *args, **kwargs)
|
||||
|
||||
def perform_destroy(self, instance):
|
||||
print("perform_destroy")
|
||||
return super().perform_destroy(instance)
|
||||
|
||||
def destroy(self, request, *args, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue