only reindex objects that have been saved (#5097)

This commit is contained in:
Frédéric Péters 2014-07-04 11:04:05 +02:00
parent 181d0949b2
commit fa0f02d0a3
1 changed files with 2 additions and 1 deletions

View File

@ -117,7 +117,8 @@ class LocalRolesToPrincipalsDataManager(AttributeField):
# finally set the value
super(LocalRolesToPrincipalsDataManager, self).set(value)
self.context.reindexObjectSecurity()
if self.context.id:
self.context.reindexObjectSecurity()
import plone.supermodel.exportimport