From 5c20be2beccbc9cb6731d32ecdc670b9aef20499 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 18 Jun 2015 05:08:23 +0200 Subject: Import: really delete associated object when deleting an import --- ishtar_common/models.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index c1ee90df6..a82638396 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1490,9 +1490,6 @@ def pre_delete_import(sender, **kwargs): return to_delete = [] for accessor, imported in instance.get_all_imported(): - # if imported is related to another import do not delete - if getattr(instance, accessor).exclude(pk=imported.pk).count(): - continue to_delete.append(imported) for item in to_delete: item.delete() -- cgit v1.2.3