[Erp5-report] r30171 - /erp5/trunk/products/ERP5Form/MatrixBox.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Oct 30 17:25:27 CET 2009


Author: jerome
Date: Fri Oct 30 17:25:25 2009
New Revision: 30171

URL: http://svn.erp5.org?rev=30171&view=rev
Log:
minor style improvements

Modified:
    erp5/trunk/products/ERP5Form/MatrixBox.py

Modified: erp5/trunk/products/ERP5Form/MatrixBox.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/MatrixBox.py?rev=30171&r1=30170&r2=30171&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/MatrixBox.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/MatrixBox.py [utf8] Fri Oct 30 17:25:25 2009
@@ -346,7 +346,7 @@
                 if form.has_field(my_field_id):
                   my_field = form.get_field(my_field_id)
                   key = my_field.id + '_cell_%s_%s_%s' % (i,j,k)
-                  if cell != None:
+                  if cell is not None:
                     attribute_value = my_field.get_value('default',
                            cell=cell, cell_index=kw, cell_position = (i,j,k))
 
@@ -512,8 +512,7 @@
                         attribute_value not in ('',None,(),[])) \
                         and not my_field.get_value('hidden'):
                       # Only validate modified values from visible fields
-                      result.setdefault(kw, {})
-                      result[kw][attribute_id] = value
+                      result.setdefault(kw, {})[attribute_id] = value
                     else:
                       if result.has_key(kw):
                         result[kw][attribute_id] = value




More information about the Erp5-report mailing list