hooks/test/data/hooks.py
author Nicolas Chauvat <nicolas.chauvat@logilab.fr>
Thu, 19 Dec 2019 12:14:52 +0100
branch3.22
changeset 12838 8db162bae07d
parent 11084 ffd615e626f9
permissions -rw-r--r--
closing branch 3.22

from cubicweb.predicates import is_instance
from cubicweb.hooks import notification


class FolderUpdateHook(notification.EntityUpdateHook):
    __select__ = (notification.EntityUpdateHook.__select__ &
                  is_instance('Folder'))
    order = 100  # late trigger so that metadata hooks come before.