summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2014-07-04 09:04:05 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2014-07-04 09:04:05 (GMT)
commitfa0f02d0a36d1e2a3ba1bcef4f4599f0f3f4d877 (patch)
tree90f9a1850a405bd39377377ad4e6b4219879f4ab
parent181d0949b2dea2f807720f7a1e96180acad13a6f (diff)
downloadcollective.z3cform.rolefield-fa0f02d0a36d1e2a3ba1bcef4f4599f0f3f4d877.zip
collective.z3cform.rolefield-fa0f02d0a36d1e2a3ba1bcef4f4599f0f3f4d877.tar.gz
collective.z3cform.rolefield-fa0f02d0a36d1e2a3ba1bcef4f4599f0f3f4d877.tar.bz2
only reindex objects that have been saved (#5097)HEADmaster
-rw-r--r--src/collective/z3cform/rolefield/field.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/collective/z3cform/rolefield/field.py b/src/collective/z3cform/rolefield/field.py
index 0b97686..189dd85 100644
--- a/src/collective/z3cform/rolefield/field.py
+++ b/src/collective/z3cform/rolefield/field.py
@@ -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