Prevent KeyError when testing user of wizard

This commit is contained in:
Cédric Krier
2010-04-07 08:14:05 +02:00
parent 2680b6c942
commit 39b90e741b
+1 -1
View File
@@ -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]