Update archived contents dashboards using new workflow "archived_states" property
--- a/src/pyams_content/root/zmi/__init__.py Wed Sep 13 09:34:56 2017 +0200
+++ b/src/pyams_content/root/zmi/__init__.py Wed Sep 13 09:36:26 2017 +0200
@@ -595,10 +595,10 @@
query = And(Eq(catalog['content_type'], tool.shared_content_type),
Or(Eq(catalog['role:owner'], principal_id),
Eq(catalog['role:contributor'], principal_id)),
- Any(catalog['workflow_state'], workflow.readonly_states))
+ Any(catalog['workflow_state'], workflow.archived_states))
params = params | query if params else query
return unique(map(lambda x: sorted((version for version in
- IWorkflowVersions(x).get_versions(IWorkflow(x).readonly_states)
+ IWorkflowVersions(x).get_versions(IWorkflow(x).archived_states)
if principal_id in (version.owner | version.contributors)),
key=lambda x: IWorkflowState(x).version_id,
reverse=True)[0],
--- a/src/pyams_content/shared/common/zmi/dashboard.py Wed Sep 13 09:34:56 2017 +0200
+++ b/src/pyams_content/shared/common/zmi/dashboard.py Wed Sep 13 09:36:26 2017 +0200
@@ -765,9 +765,9 @@
params = And(Eq(catalog['content_type'], self.context.shared_content_type),
Or(Eq(catalog['role:owner'], principal_id),
Eq(catalog['role:contributor'], principal_id)),
- Any(catalog['workflow_state'], workflow.readonly_states))
+ Any(catalog['workflow_state'], workflow.archived_states))
return unique(map(lambda x: sorted((version for version in
- IWorkflowVersions(x).get_versions(IWorkflow(x).readonly_states)
+ IWorkflowVersions(x).get_versions(workflow.archived_states)
if principal_id in (version.owner | version.contributors)),
key=lambda x: IWorkflowState(x).version_id,
reverse=True)[0],