Commit 809d0cbb by Dudás Ádám Committed by Your Name

storage: use delete() method on model instead of post_delete signal

parent ca16a380
...@@ -4,7 +4,6 @@ import logging ...@@ -4,7 +4,6 @@ import logging
import uuid import uuid
from django.db import models from django.db import models
from django.db.models.signals import post_delete
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from model_utils.models import TimeStampedModel from model_utils.models import TimeStampedModel
from sizefield.models import FileSizeField from sizefield.models import FileSizeField
...@@ -145,10 +144,7 @@ class Disk(TimeStampedModel): ...@@ -145,10 +144,7 @@ class Disk(TimeStampedModel):
self.save() self.save()
return True return True
@classmethod def delete(self):
def delete_signal(cls, sender, instance, using, **kwargs):
# TODO # TODO
# StorageDriver.delete_disk.delay(instance.to_json()).get() # StorageDriver.delete_disk.delay(instance.to_json()).get()
pass pass
post_delete.connect(Disk.delete_signal, sender=Disk)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment