[Erp5-report] r18239 - /erp5/trunk/products/ERP5Type/Interface/Constraint.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Dec 11 16:23:15 CET 2007


Author: jerome
Date: Tue Dec 11 16:23:14 2007
New Revision: 18239

URL: http://svn.erp5.org?rev=18239&view=rev
Log:
update doc. use `error_list` instead of `errors` name.

remove "XXX How to call only one constraint, even if this constraint is not
defined on property sheet ?" the solution is to do as it's done in the test.
And this is not how application code should use constraints anyway.
  

Modified:
    erp5/trunk/products/ERP5Type/Interface/Constraint.py

Modified: erp5/trunk/products/ERP5Type/Interface/Constraint.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Interface/Constraint.py?rev=18239&r1=18238&r2=18239&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Interface/Constraint.py (original)
+++ erp5/trunk/products/ERP5Type/Interface/Constraint.py Tue Dec 11 16:23:14 2007
@@ -77,9 +77,6 @@
   Products.ERP5Type.Core.Folder.Folder, checkConsistency will be called
   recursivly.
     
-  XXX How to call only one constraint, even if this constraint is not defined
-  on property sheet ?
-
   """
   
   def checkConsistency(obj, fixit=0):
@@ -95,7 +92,7 @@
     can simply call::
        
       >>> if something_is_wrong:
-      >>>   errors.append(self._generateError(obj, 'Something is wrong !')
+      >>>   error_list.append(self._generateError(obj, 'Something is wrong !')
     
     Then this message ("Something is wrong !") will be translated when the
     caller of document.checkConsistency() calls getTranslatedMessage() on
@@ -105,7 +102,7 @@
     'mapping' for substitution, like this::
     
       >>> if something_is_wrong:
-      >>>   errors.append(self._generateError(obj,
+      >>>   error_list.append(self._generateError(obj,
       ...      'Something is wrong: ${wrong_thing}',
       ...      mapping=dict(wrong_thing=obj.getTheWrongThing())))
    




More information about the Erp5-report mailing list