cubicweb/hooks/test/data/hooks.py
author Arthur Lutz <arthur.lutz@logilab.fr>
Fri, 31 Jan 2020 17:24:31 +0100
branch3.27
changeset 12863 f725078656bd
parent 12355 c703dc95c82e
permissions -rw-r--r--
[doc/index] fix link to "how to contribute" and add link to dev dashboard

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.