Repository: plone.app.robotframework
Branch: refs/heads/master
Date: 2014-12-01T09:36:10+01:00
Author: Martin Opstad Reistadbakk (martior) <martin@blaastolen.com>
Commit: https://github.com/plone/plone.app.robotframework/commit/bd2402b165c20a14e412561d64a0f9c79ebf53b7

send a object modified event on Set field value to fix Products.CMFPlone/issues/255

Files changed:
M src/plone/app/robotframework/content.py

diff --git a/src/plone/app/robotframework/content.py b/src/plone/app/robotframework/content.py
index 21fae41..7cbcb89 100644
--- a/src/plone/app/robotframework/content.py
+++ b/src/plone/app/robotframework/content.py
@@ -11,6 +11,8 @@
 from plone.app.robotframework.config import HAS_DEXTERITY
 from plone.app.robotframework.config import HAS_DEXTERITY_RELATIONS
 from plone.app.robotframework.config import HAS_BLOBS
+from zope.event import notify
+from zope.lifecycleevent import ObjectModifiedEvent
 
 if HAS_DEXTERITY:
     from plone.app.textfield.value import RichTextValue
@@ -199,6 +201,7 @@ def set_field_value(self, uid, field, value, field_type):
 
             setattr(obj, field, value)
             obj.reindexObject()
+            notify(ObjectModifiedEvent(obj, dict(field=value)))
 
     def uid_to_url(self, uid):
         """Return absolute path for an UID"""