author | Philippe Pepiot <philippe.pepiot@logilab.fr> |
Tue, 24 Jan 2017 14:09:13 +0100 | |
changeset 11918 | a88101bf9f87 |
parent 11129 | 97095348b3ee |
child 12355 | c703dc95c82e |
permissions | -rw-r--r-- |
11084
ffd615e626f9
[hooks] Skip modification_date attribute in "notifentityupdated" hook
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff
changeset
|
1 |
from cubicweb.predicates import is_instance |
ffd615e626f9
[hooks] Skip modification_date attribute in "notifentityupdated" hook
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff
changeset
|
2 |
from cubicweb.hooks import notification |
ffd615e626f9
[hooks] Skip modification_date attribute in "notifentityupdated" hook
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff
changeset
|
3 |
|
ffd615e626f9
[hooks] Skip modification_date attribute in "notifentityupdated" hook
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff
changeset
|
4 |
|
ffd615e626f9
[hooks] Skip modification_date attribute in "notifentityupdated" hook
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff
changeset
|
5 |
class FolderUpdateHook(notification.EntityUpdateHook): |
ffd615e626f9
[hooks] Skip modification_date attribute in "notifentityupdated" hook
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff
changeset
|
6 |
__select__ = (notification.EntityUpdateHook.__select__ & |
ffd615e626f9
[hooks] Skip modification_date attribute in "notifentityupdated" hook
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff
changeset
|
7 |
is_instance('Folder')) |
ffd615e626f9
[hooks] Skip modification_date attribute in "notifentityupdated" hook
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff
changeset
|
8 |
order = 100 # late trigger so that metadata hooks come before. |