Commit ad984374 authored by Ivan Tyagov's avatar Ivan Tyagov

Clear cache using portal_caches tool not global function so no warning is raised.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16018 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent af578845
......@@ -35,7 +35,6 @@ from Products.CMFCore.utils import getToolByName
from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
from Products.ERP5Type.Utils import assertAttributePortalType
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type.Cache import clearCache
try:
from Products import PluggableAuthService
......@@ -180,7 +179,8 @@ class Person(XMLObject):
self._setReference(value)
self.reindexObject()
# invalid the cache for ERP5Security
clearCache(cache_factory_list=('erp5_content_short', ))
portal_caches = getToolByName(self.getPortalObject(), 'portal_caches')
portal_caches.clearCache(cache_factory_list=('erp5_content_short', ))
security.declareProtected(Permissions.SetOwnPassword, 'setPassword')
def setPassword(self, value) :
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment