Migrating data from site to site, using transmogrifier and copy/paste operations, new modification dates are added; I'd like the remove those dates. Is there an easy method?
A long time ago, someone decided that reindexObject
called with []
as idx
parameter (the default) updates the modification date. To avoid the modification, there are several options (list likely not exhaustive):
- use
indexObject
rather thanreindexObject
- call
reindexObject
with an explicit (non-empty) sequence of indexes -
reindex
object does not itself modify the modification date but calls the object'snotifyModified
. You can check what this method does (likely it notifies an event) and intervene appropriately to ensure that things happen as you want them.
1 Like
Why reindexing an object is considered a modification
(worth a new modification time stamp)?
I see what's happening, here in plone/dexterity/content.py:
@security.private
def notifyModified(self):
# Update creators and modification_date.
# This is called from CMFCatalogAware.reindexObject.
self.addCreator()
self.setModificationDate()
What is @security.private
for?