Browse Source

Fix: Should ignore error caused by pins which reference same image

pull/139/head
winkidney 5 years ago
parent
commit
153dc0daef
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      core/models.py

+ 4
- 1
core/models.py View File

@@ -89,4 +89,7 @@ class Pin(models.Model):

@receiver(models.signals.post_delete, sender=Pin)
def delete_pin_images(sender, instance, **kwargs):
instance.image.delete()
try:
instance.image.delete()
except Image.DoesNotExist:
pass

Loading…
Cancel
Save