From 3c6672b1cb6bba6d31834769a849e541259b4bbf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 30 Oct 2009 16:25:25 +0000
Subject: [PATCH] minor style improvements

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

diff --git a/product/ERP5Form/MatrixBox.py b/product/ERP5Form/MatrixBox.py
index 267ca0cc20..bfa6899425 100644
--- a/product/ERP5Form/MatrixBox.py
+++ b/product/ERP5Form/MatrixBox.py
@@ -346,7 +346,7 @@ class MatrixBoxWidget(Widget.Widget):
                 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 @@ class MatrixBoxValidator(Validator.Validator):
                         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
-- 
2.30.9