[Erp5-report] r23625 - /erp5/trunk/products/ERP5Form/FormulatorPatch.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Sep 16 11:25:48 CEST 2008


Author: ivan
Date: Tue Sep 16 11:25:36 2008
New Revision: 23625

URL: http://svn.erp5.org?rev=23625&view=rev
Log:
Minor code optimisation.

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

Modified: erp5/trunk/products/ERP5Form/FormulatorPatch.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/FormulatorPatch.py?rev=23625&r1=23624&r2=23625&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/FormulatorPatch.py (original)
+++ erp5/trunk/products/ERP5Form/FormulatorPatch.py Tue Sep 16 11:25:36 2008
@@ -714,13 +714,12 @@
   selected_found = {}
 
   items = field.get_value('items',REQUEST=REQUEST, cell=getattr(REQUEST,'cell',None)) # Added request
-  if not items:
-    if not isinstance(self, MultiLinkFieldWidget):
-      # multi items widget should have at least one child in order to produce
-      # valid XHTML; disable it so user can not select it.
-      # This cannot be applied to MultiLinkFields, which are just some <a>
-      # links
-      return [self.render_item('', '', '', '', 'disabled="disabled"')]
+  if not items and not isinstance(self, MultiLinkFieldWidget):
+    # multi items widget should have at least one child in order to produce
+    # valid XHTML; disable it so user can not select it.
+    # This cannot be applied to MultiLinkFields, which are just some <a>
+    # links
+    return [self.render_item('', '', '', '', 'disabled="disabled"')]
 
   css_class = field.get_value('css_class')
   extra_item = field.get_value('extra_item')




More information about the Erp5-report mailing list