From 17107d80e46987327741529fe07e6fccba27c302 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sat, 9 Mar 2019 15:58:12 +0100 Subject: Fix document deletion - tests --- ishtar_common/wizards.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ishtar_common/wizards.py') diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index b5fe507b0..375004e67 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -1495,6 +1495,7 @@ class DeletionWizard(Wizard): if (not hasattr(self, 'fields') or not self.fields) and \ (hasattr(self, 'model') and hasattr(self.model, 'TABLE_COLS')): self.fields = self.model.TABLE_COLS + assert self.model return super(DeletionWizard, self).__init__(*args, **kwargs) def get_formated_datas(self, forms): @@ -1812,6 +1813,7 @@ class SourceWizard(Wizard): class DocumentDeletionWizard(DeletionWizard): + model = models.Document fields = [ f.name for f in models.Document._meta.get_fields() if f.name != 'id' and f.name not in models.Document.RELATED_MODELS] -- cgit v1.2.3