--- a/src/pyams_workflow/workflow.py Tue Oct 11 17:08:11 2016 +0200
+++ b/src/pyams_workflow/workflow.py Tue Nov 15 10:44:51 2016 +0100
@@ -25,12 +25,12 @@
from pyams_utils.registry import get_utility
from pyams_utils.request import check_request
from pyams_utils.traversing import get_parent
+from pyams_utils.vocabulary import vocabulary_config
from pyramid.httpexceptions import HTTPUnauthorized
from pyramid.threadlocal import get_current_registry
from zope.componentvocabulary.vocabulary import UtilityVocabulary
from zope.interface import implementer
from zope.lifecycleevent import ObjectModifiedEvent
-from zope.schema.vocabulary import getVocabularyRegistry
from pyams_workflow import _
@@ -274,10 +274,9 @@
return [transition for transition in transitions if transition.trigger == trigger]
+@vocabulary_config(name='PyAMS workflows')
class WorkflowsVocabulary(UtilityVocabulary):
"""Workflows vocabulary"""
interface = IWorkflow
nameOnly = True
-
-getVocabularyRegistry().register('PyAMS workflows', WorkflowsVocabulary)