Updated review JSON response
authorThierry Florac <thierry.florac@onf.fr>
Fri, 13 Oct 2017 08:38:14 +0200
changeset 225 e9b4aa6b9a79
parent 224 fcac7810b9d6
child 226 51a05a1f4212
Updated review JSON response
src/pyams_content/shared/common/zmi/review.py
--- a/src/pyams_content/shared/common/zmi/review.py	Fri Oct 13 08:37:49 2017 +0200
+++ b/src/pyams_content/shared/common/zmi/review.py	Fri Oct 13 08:38:14 2017 +0200
@@ -138,13 +138,17 @@
             return {'status': 'success',
                     'message': translate(_("Request successful. "
                                            "{count} new notification(s) have been sent")).format(count=changes),
-                    'event': 'PyAMS_content.changed_item',
-                    'event_options': {'object_type': 'review_comments'}}
+                    'events': [{
+                        'event': 'PyAMS_content.changed_item',
+                        'options': {'handler': 'PyAMS_content.review.updateComments'}
+                    }]}
         else:
             return {'status': 'info',
                     'message': translate(_("Request successful. No new notification have been sent")),
-                    'event': 'PyAMS_content.changed_item',
-                    'event_options': {'object_type': 'review_comments'}}
+                    'events': [{
+                        'event': 'PyAMS_content.changed_item',
+                        'options': {'handler': 'PyAMS_content.review.updateComments'}
+                    }]}
 
 
 #