Ignore request in JSON form refresh events
authorThierry Florac <thierry.florac@onf.fr>
Fri, 13 Apr 2018 12:07:28 +0200
changeset 312 f31733028778
parent 311 8998faf1ef23
child 313 d2676eff7f10
Ignore request in JSON form refresh events
src/pyams_skin/event.py
--- a/src/pyams_skin/event.py	Thu Apr 12 09:20:54 2018 +0200
+++ b/src/pyams_skin/event.py	Fri Apr 13 12:07:28 2018 +0200
@@ -36,6 +36,7 @@
 def get_json_form_refresh_event(context, request, form_factory):
     """Get JSON response for form refresh event"""
     form = form_factory(context, request)
+    form.ignoreRequest = True
     form.update()
     return {
         'event': 'myams.refresh',
@@ -50,6 +51,7 @@
 def get_json_widget_refresh_event(context, request, form_factory, widget):
     """Get JSON response for form widget refresh event"""
     form = form_factory(context, request)
+    form.ignoreRequest = True
     form.update()
     widget = form.widgets[widget]
     return {