From 7ba31396a8cf7e523537e8f6fb1d8bc4cc41ea12 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 11 Dec 2018 18:31:27 +0100 Subject: Manage treatment state and effective execution --- archaeological_finds/wizards.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'archaeological_finds/wizards.py') diff --git a/archaeological_finds/wizards.py b/archaeological_finds/wizards.py index d523170eb..7f4e1b498 100644 --- a/archaeological_finds/wizards.py +++ b/archaeological_finds/wizards.py @@ -202,10 +202,11 @@ class TreatmentWizard(TreatmentBase): raise PermissionDenied dct['items'] = list(basket.items.all()) - for find in dct['items']: - if 'own' in self.current_right \ - and not find.is_own(dct['history_modifier']): - raise PermissionDenied + if 'items' in dct: + for find in dct['items']: + if 'own' in self.current_right \ + and not find.is_own(dct['history_modifier']): + raise PermissionDenied return dct -- cgit v1.2.3