From 39b90e741bfbd82da2e16477c5f2355854cbf30b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 7 Apr 2010 08:14:05 +0200 Subject: [PATCH] Prevent KeyError when testing user of wizard --- trytond/wizard/wizard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trytond/wizard/wizard.py b/trytond/wizard/wizard.py index 152ce7c461..fbc38d3c52 100644 --- a/trytond/wizard/wizard.py +++ b/trytond/wizard/wizard.py @@ -132,7 +132,7 @@ class Wizard(object): context = {} res = {} - if self._datas[wiz_id]['user'] != user: + if self._datas.get(wiz_id, {}).get('user') != user: raise Exception('AccessDenied') self._datas[wiz_id].update(data) data = self._datas[wiz_id]