From dee47bdea890385a659b8aff75b9b4ed51c139b7 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 11 Feb 2020 00:29:29 +1100 Subject: [PATCH] Prevent django_cleanup from deleting part thumbs that are used elsewhere - Will need to implement a method for automatically deleting part thumbs... --- InvenTree/part/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/InvenTree/part/models.py b/InvenTree/part/models.py index 4109946dce..52dfa96ba5 100644 --- a/InvenTree/part/models.py +++ b/InvenTree/part/models.py @@ -23,6 +23,8 @@ from django.dispatch import receiver from markdownx.models import MarkdownxField +from django_cleanup import cleanup + from mptt.models import TreeForeignKey from datetime import datetime @@ -191,6 +193,7 @@ def match_part_names(match, threshold=80, reverse=True, compare_length=False): return matches +@cleanup.ignore class Part(models.Model): """ The Part object represents an abstract part, the 'concept' of an actual entity.