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

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Aug 8 18:37:06 CEST 2007


Author: vincent
Date: Wed Aug  8 18:37:06 2007
New Revision: 15568

URL: http://svn.erp5.org?rev=15568&view=rev
Log:
Prevent Formulator (and incidentaly ERP5Form) from bloating the ZODB at each zope restart. This also cures conflict error occuring when restarting 2 zopes concurently on the same zeo server.

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=15568&r1=15567&r2=15568&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/FormulatorPatch.py (original)
+++ erp5/trunk/products/ERP5Form/FormulatorPatch.py Wed Aug  8 18:37:06 2007
@@ -24,10 +24,18 @@
 from Products.Formulator.Field import Field
 from Products.Formulator.Widget import Widget
 from Products.Formulator.Widget import render_element
+from Products.Formulator.FieldRegistry import FieldRegistry
 from AccessControl import ClassSecurityInfo
 from cgi import escape
 import types
 from zLOG import LOG
+
+def noop(*args, **kw):
+  pass
+
+# XXX: this is a quick fix to avoid bloating the ZODB.
+# Proper fix should only add FieldHelp when it's missing.
+FieldRegistry.registerFieldHelp = noop
 
 def Field_generate_field_key(self, validation=0, key=None):
     """Generate the key Silva uses to render the field in the form.




More information about the Erp5-report mailing list