server/edition.py
changeset 8494 1527b012802f
parent 8493 25da1e5c7c50
child 8513 552de9f0c46d
--- a/server/edition.py	Tue Jul 24 10:16:25 2012 +0200
+++ b/server/edition.py	Tue Jul 24 11:19:16 2012 +0200
@@ -1,4 +1,4 @@
-# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
 #
 # This file is part of CubicWeb.
@@ -61,7 +61,10 @@
         # attributes, else we may accidentaly skip a desired security check
         if attr not in self:
             self.skip_security.add(attr)
-        self.entity._cw_dont_cache_attribute(attr)
+        elif value != self[attr]:
+            # also, if value differs, mark attribute as needing purge by the
+            # client
+            self.entity._cw_dont_cache_attribute(attr)
         self.edited_attribute(attr, value)
 
     def __delitem__(self, attr):