From 9e6ce5ab5af2e18ca5ccb80d3b492438169bda8a Mon Sep 17 00:00:00 2001
From: Jean-Paul Smets <jp@nexedi.com>
Date: Mon, 24 Sep 2007 18:44:07 +0000
Subject: [PATCH] probably a mistake in EditableField

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16583 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Form/Form.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/product/ERP5Form/Form.py b/product/ERP5Form/Form.py
index 2b7feaf92c..037c984bb7 100644
--- a/product/ERP5Form/Form.py
+++ b/product/ERP5Form/Form.py
@@ -191,9 +191,9 @@ class EditableValue(StaticValue):
     # This is useful to render ERP5 content as in a web site (ECommerce)
     # editable_mode should be set for example by the page template
     # which defines the current layout
-    if kw.has_key('REQUEST'):
+    if kw.get('REQUEST', None) is not None:
       if not getattr(kw['REQUEST'], 'editable_mode', 1):
-        self.value = 0
+        return 0
     return self.value
 
 def getFieldValue(self, field, id, **kw):
-- 
2.30.9