--- a/src/pyams_content/workflow/task.py Fri Nov 10 12:07:43 2017 +0100
+++ b/src/pyams_content/workflow/task.py Tue Nov 14 14:05:30 2017 +0100
@@ -18,11 +18,12 @@
# import interfaces
from hypatia.interfaces import ICatalog
-from pyams_content.shared.common.interfaces import ISharedTool
+from pyams_content.shared.common.interfaces import IBaseSharedTool
from pyams_content.workflow.interfaces import IContentArchiverTask
from pyams_i18n.interfaces import II18n
from pyams_sequence.interfaces import ISequentialIdInfo
from pyams_workflow.interfaces import IWorkflow, IWorkflowInfo
+from zope.intid.interfaces import IIntIds
# import packages
from hypatia.catalog import CatalogQuery
@@ -46,12 +47,13 @@
def run(self, report):
request = check_request()
translate = request.localizer.translate
+ intids = get_utility(IIntIds)
catalog = get_utility(ICatalog)
now = gmtime(datetime.utcnow())
has_retired = False
- for tool in get_all_utilities_registered_for(ISharedTool):
+ for tool in get_all_utilities_registered_for(IBaseSharedTool):
workflow = IWorkflow(tool)
- params = Eq(catalog['content_type'], tool.shared_content_type) & \
+ params = Eq(catalog['parents'], intids.register(tool)) & \
Any(catalog['workflow_state'], workflow.published_states) & \
Lt(catalog['expiration_date'], now)
for content in CatalogResultSet(CatalogQuery(catalog).query(params)):