[Erp5-report] r32754 nicolas.dumazet - /erp5/trunk/products/ERP5Type/XMLMatrix.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Feb 18 11:51:30 CET 2010


Author: nicolas.dumazet
Date: Thu Feb 18 11:51:27 2010
New Revision: 32754

URL: http://svn.erp5.org?rev=32754&view=rev
Log:
getCell has exactly the same code; just call it directly

Modified:
    erp5/trunk/products/ERP5Type/XMLMatrix.py

Modified: erp5/trunk/products/ERP5Type/XMLMatrix.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/XMLMatrix.py?rev=32754&r1=32753&r2=32754&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] Thu Feb 18 11:51:27 2010
@@ -68,10 +68,10 @@
       """
           Access a cell at row and column
       """
-      base_id= kwd.get('base_id', "cell")
       if getattr(aq_base(self), 'index', None) is None:
         return None
 
+      base_id = kwd.get('base_id', "cell")
       if not self.index.has_key(base_id):
         return None
 
@@ -100,18 +100,7 @@
           Checks if matrix corresponding to base_id contains cell specified
           by *kw coordinates.
       """
-      if getattr(aq_base(self), 'index', None) is None:
-        return 0
-
-      base_id= kwd.get('base_id', "cell")
-      if not self.index.has_key(base_id):
-        return 0
-
-      cell_id = self.keyToId(kw, base_id = base_id)
-      if cell_id is None:
-        return 0
-
-      return self.get(cell_id) is not None
+      return self.getCell(*kw, **kwd) is not None
 
     security.declareProtected( Permissions.AccessContentsInformation,
                                'hasCellContent' )




More information about the Erp5-report mailing list