From 9598665c383d0b1bd30584b60b0f3a2e196b6935 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 11 Jul 2017 14:29:38 +0200 Subject: Fix find deletion when warehouse module is activated (refs #3649) --- ishtar_common/wizards.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ishtar_common/wizards.py') diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index 8d787d733..3f90f8c48 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -1232,10 +1232,11 @@ class DeletionWizard(Wizard): def done(self, form_list, **kwargs): obj = self.get_current_object() - try: - obj.delete() - except ObjectDoesNotExist: - pass + if obj: + try: + obj.delete() + except ObjectDoesNotExist: + pass return render_to_response( 'ishtar/wizard/wizard_delete_done.html', {}, context_instance=RequestContext(self.request)) -- cgit v1.2.3