Make sure comment UIDs in the catalog are always unique. This fixes

http://dev.plone.org/plone/ticket/10652. We depend on plone.uuid and plone.app.uuid now. Refs #10652.

svn path=/plone.app.discussion/trunk/; revision=46005
This commit is contained in:
Timo Stollenwerk
2010-11-28 11:39:19 +00:00
parent 664e5c273e
commit ac4a64f55d
5 changed files with 47 additions and 2 deletions
+2
View File
@@ -41,6 +41,7 @@ from zope.container.contained import ContainerModifiedEvent
try:
# Plone 4
from zope.lifecycleevent import ObjectAddedEvent
from zope.lifecycleevent import ObjectCreatedEvent
from zope.lifecycleevent import ObjectRemovedEvent
except ImportError: # pragma: no cover
# Plone 3.x
@@ -252,6 +253,7 @@ class Conversation(Traversable, Persistent, Explicit):
# Notify that the object is added. The object must here be
# acquisition wrapped or the indexing will fail.
notify(ObjectCreatedEvent(comment))
notify(ObjectAddedEvent(comment.__of__(self), self, id))
notify(ContainerModifiedEvent(self))