[hooks] check key or value is actually edited
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 05 Aug 2009 17:22:33 +0200
changeset 2695 56439c45781c
parent 2694 4303ff921a9b
child 2696 b45d852990d5
[hooks] check key or value is actually edited
server/hooks.py
--- a/server/hooks.py	Wed Aug 05 10:52:09 2009 +0200
+++ b/server/hooks.py	Wed Aug 05 17:22:33 2009 +0200
@@ -536,6 +536,9 @@
 
 
 def after_update_eproperty(session, entity):
+    if not ('pkey' in entity.edited_attributes or
+            'value' in entity.edited_attributes):
+        return
     key, value = entity.pkey, entity.value
     try:
         value = session.vreg.typed_value(key, value)