Commit f4623bfb authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

override clear_all_caches to clear cwetype_workflow cache

branch : 3.5
parent 083593802120
......@@ -9,7 +9,7 @@ __docformat__ = "restructuredtext en"
from warnings import warn
from logilab.common.decorators import cached
from logilab.common.decorators import cached, clear_cache
from logilab.common.deprecation import deprecated
from cubicweb.entities import AnyEntity, fetch_config
......@@ -370,6 +370,11 @@ class WorkflowableMixIn(object):
('wf_info_for', 'E'), S=state.eid, E=self.eid,
**self._get_tr_kwargs(comment, commentformat))
def clear_all_caches(self):
super(WorkflowableMixIn, self).clear_all_caches()
clear_cache(self, 'cwetype_workflow')
@deprecated('get transition from current workflow and use its may_be_fired method')
def can_pass_transition(self, trname):
"""return the Transition instance if the current user can fire the
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment