Added transaction savepoint after form update to finalize all inner components state before rendering
--- a/src/pyams_form/form.py Thu Jun 14 08:57:33 2018 +0200
+++ b/src/pyams_form/form.py Thu Jun 14 10:35:51 2018 +0200
@@ -18,6 +18,7 @@
import logging
logger = logging.getLogger('PyAMS (form)')
+import transaction
import venusian
# import interfaces
@@ -133,6 +134,8 @@
[subform.update() for subform in self.subforms]
[tabform.update() for tabform in self.tabforms]
Form.update(self)
+ # savepoint is required for each inner component to be persisted!!
+ transaction.savepoint()
def updateWidgets(self, prefix=None):
super(BaseForm, self).updateWidgets(prefix)