[Erp5-report] r31149 yo - /erp5/trunk/products/ERP5Form/Form.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Dec 8 12:15:46 CET 2009
Author: yo
Date: Tue Dec 8 12:15:42 2009
New Revision: 31149
URL: http://svn.erp5.org?rev=31149&view=rev
Log:
Even if REQUEST is contained in the parameters, assume that it is not really passed, when None.
Modified:
erp5/trunk/products/ERP5Form/Form.py
Modified: erp5/trunk/products/ERP5Form/Form.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/Form.py?rev=31149&r1=31148&r2=31149&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/Form.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/Form.py [utf8] Tue Dec 8 12:15:42 2009
@@ -176,9 +176,9 @@
# This allows to pass some pointer to the local object
# through the REQUEST parameter. Not very clean.
# Used by ListBox to render different items in a list
- if kw.has_key('REQUEST') and kw.get('cell', None) is None:
- if getattr(kw['REQUEST'],'cell', None) is not None:
- kw['cell'] = getattr(kw['REQUEST'],'cell')
+ if kw.get('REQUEST', None) is not None and kw.get('cell', None) is None:
+ if getattr(kw['REQUEST'], 'cell', None) is not None:
+ kw['cell'] = getattr(kw['REQUEST'], 'cell')
else:
kw['cell'] = kw['REQUEST']
elif kw.get('cell', None) is None:
More information about the Erp5-report
mailing list