diff --git a/product/ERP5/ERP5Site.py b/product/ERP5/ERP5Site.py
index c604101ea7be59512e0e33502a44f0f09cafa6e4..4f872f27678cb69262ca9ecc4840b97f6efb32cf 100755
--- a/product/ERP5/ERP5Site.py
+++ b/product/ERP5/ERP5Site.py
@@ -289,7 +289,7 @@ class ERP5Site ( CMFSite, FolderMixIn ):
       def getStateList(group):
         state_dict = {}
         for wf in self.portal_workflow.objectValues():
-          if hasattr(wf, 'states'):
+          if getattr(wf, 'states', None):
             for state in wf.states.objectValues():
               if group in getattr(state, 'type_list', ()):
                 state_dict[state.getId()] = None