[Erp5-report] r15661 - /erp5/trunk/products/ERP5Form/Form.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Aug 14 09:49:57 CEST 2007


Author: jerome
Date: Tue Aug 14 09:49:57 2007
New Revision: 15661

URL: http://svn.erp5.org?rev=15661&view=rev
Log:
Proxify tool:
 handle the case of None values in copy
 fix the problem of removing some keys while iterating on the dictionnary


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=15661&r1=15660&r2=15661&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/Form.py (original)
+++ erp5/trunk/products/ERP5Form/Form.py Tue Aug 14 09:49:57 2007
@@ -667,8 +667,8 @@
                     value = Method(value.method_name)
                 elif type(value) is TALESMethod:
                     value = TALESMethod(value._text)
-                elif not isinstance(value, (str, unicode, int, long, bool,
-                                            list, tuple, dict)):
+                elif value is not None and not isinstance(value,
+                        (str, unicode, int, long, bool, list, tuple, dict)):
                     raise ValueError, repr(value)
                 new_dict[key] = value
             return new_dict
@@ -742,7 +742,7 @@
                             if is_equal(target_field.get_recursive_orig_value(i),
                                         new_values[i]):
                                 del new_values[i]
-                for i in new_tales:
+                for i in new_tales.keys():
                     if not i in target_field.delegated_list:
                         # obsolete variable check
                         try:




More information about the Erp5-report mailing list