diff --git a/product/ERP5Type/patches/DCWorkflow.py b/product/ERP5Type/patches/DCWorkflow.py
index c404fd6f96e3096e24fbf89337f9861c6d9a5fca..d9457a8fd53a26e1e71627be584aa3cfc3138438 100644
--- a/product/ERP5Type/patches/DCWorkflow.py
+++ b/product/ERP5Type/patches/DCWorkflow.py
@@ -254,10 +254,10 @@ def DCWorkflowDefinition_getWorklistVariableMatchDict(self, info,
         variable_match['portal_type'] = list(portal_type_intersection)
       variable_match.setdefault('portal_type', portal_type_list)
 
-      is_permitted_worklist = 0
       if len(variable_match.get('portal_type', [])):
-        pass
-      elif guard is None:
+        continue
+      is_permitted_worklist = 0
+      if guard is None:
         is_permitted_worklist = 1
       elif (not check_guard) or \
           Guard_checkWithoutRoles(guard, security_manager, self, portal):