浏览代码

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

pull/139/head
winkidney 5 年前
父节点
当前提交
153dc0daef
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. +4
    -1
      core/models.py

+ 4
- 1
core/models.py 查看文件

@@ -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

正在加载...
取消
保存