src/pyams_content/root/zmi/__init__.py
changeset 956 a8723fffbaf6
parent 945 9059a3100378
child 1024 cbc4b53f6dd2
--- a/src/pyams_content/root/zmi/__init__.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/root/zmi/__init__.py	Wed Sep 19 10:54:08 2018 +0200
@@ -172,8 +172,8 @@
         for tool in get_all_utilities_registered_for(IBaseSharedTool):
             workflow = IWorkflow(tool)
             query = Eq(catalog['parents'], intids.register(tool)) & \
-                    Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
-                    Any(catalog['workflow_state'], workflow.waiting_states)
+                Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                Any(catalog['workflow_state'], workflow.waiting_states)
             params = params | query if params else query
         yield from filter(self.check_access,
                           unique_iter(map(lambda x: sorted(IWorkflowVersions(x).get_versions(IWorkflowState(x).state),
@@ -219,9 +219,9 @@
         for tool in get_all_utilities_registered_for(IBaseSharedTool):
             workflow = IWorkflow(tool)
             query = Eq(catalog['parents'], intids.register(tool)) & \
-                    Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
-                    Any(catalog['workflow_state'], workflow.waiting_states) & \
-                    Eq(catalog['workflow_principal'], self.request.principal.id)
+                Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                Any(catalog['workflow_state'], workflow.waiting_states) & \
+                Eq(catalog['workflow_principal'], self.request.principal.id)
             params = params | query if params else query
         yield from unique_iter(map(lambda x: sorted(IWorkflowVersions(x).get_versions(IWorkflowState(x).state),
                                                     key=lambda y: IZopeDublinCore(y).modified, reverse=True)[0],
@@ -381,7 +381,7 @@
         for tool in get_all_utilities_registered_for(IBaseSharedTool):
             workflow = IWorkflow(tool)
             query = And(Eq(catalog['parents'], intids.register(tool)),
-                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & 
                         Or(Eq(catalog['role:owner'], self.request.principal.id),
                            Eq(catalog['role:contributor'], self.request.principal.id)),
                         Eq(catalog['workflow_state'], workflow.initial_state))
@@ -443,7 +443,7 @@
         for tool in get_all_utilities_registered_for(IBaseSharedTool):
             workflow = IWorkflow(tool)
             query = And(Eq(catalog['parents'], intids.register(tool)),
-                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & 
                         Or(Eq(catalog['role:owner'], self.request.principal.id),
                            Eq(catalog['role:contributor'], self.request.principal.id)),
                         Any(catalog['workflow_state'], workflow.waiting_states))
@@ -505,7 +505,7 @@
         for tool in get_all_utilities_registered_for(IBaseSharedTool):
             workflow = IWorkflow(tool)
             query = And(Eq(catalog['parents'], intids.register(tool)),
-                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & 
                         Or(Eq(catalog['role:owner'], self.request.principal.id),
                            Eq(catalog['role:contributor'], self.request.principal.id)),
                         Any(catalog['workflow_state'], workflow.published_states))
@@ -567,7 +567,7 @@
         for tool in get_all_utilities_registered_for(IBaseSharedTool):
             workflow = IWorkflow(tool)
             query = And(Eq(catalog['parents'], intids.register(tool)),
-                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & 
                         Or(Eq(catalog['role:owner'], self.request.principal.id),
                            Eq(catalog['role:contributor'], self.request.principal.id)),
                         Any(catalog['workflow_state'], workflow.retired_states))
@@ -631,7 +631,7 @@
         for tool in get_all_utilities_registered_for(IBaseSharedTool):
             workflow = IWorkflow(tool)
             query = And(Eq(catalog['parents'], intids.register(tool)),
-                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & 
                         Or(Eq(catalog['role:owner'], principal_id),
                            Eq(catalog['role:contributor'], principal_id)),
                         Any(catalog['workflow_state'], workflow.archived_states))
@@ -721,7 +721,7 @@
         for tool in get_all_utilities_registered_for(IBaseSharedTool):
             workflow = IWorkflow(tool)
             query = And(Eq(catalog['parents'], intids.register(tool)),
-                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & 
                         Any(catalog['workflow_state'], workflow.published_states))
             params = params | query if params else query
         yield from unique_iter(CatalogResultSet(CatalogQuery(catalog).query(params,