def evolve(site): offices = site.get('offices') if offices is None: return for doc in postorder(offices): if hasattr(doc, '__custom_acl__'): continue try: ct = get_content_type(doc) except: continue if ct is None: continue wf = get_workflow(ct, 'security', doc) if wf is None: continue if wf.name != 'intranet-content': continue print 'Resetting workflow for', model_path(doc) wf.reset(doc) _reindex(offices)
def evolve(site): offices = site.get('offices') if offices is None: return for doc in postorder(offices): if hasattr(doc, '__custom_acl__'): continue try: ct = get_content_type(doc) except: continue if ct is None: continue wf = get_workflow(ct, 'security', doc) if wf is None: continue if wf.name != 'intranet-content': continue print 'Resetting workflow for', resource_path(doc) wf.reset(doc) _reindex(offices)
def _callFUT(self, *arg, **kw): from karl.workflow import _reindex return _reindex(*arg, **kw)