entity.py
changeset 6498 0ad62d6b6f8e
parent 6467 869813c2dd40
child 6499 c4123c741c66
--- a/entity.py	Thu Oct 14 17:32:36 2010 +0200
+++ b/entity.py	Fri Oct 15 11:25:51 2010 +0200
@@ -1096,7 +1096,10 @@
 
     @deprecated('[3.10] use entity.cw_attr_cache[attr] = value')
     def __set__(self, eobj, value):
-        eobj.cw_attr_cache[self._attrname] = value
+        if hasattr(eobj, 'cw_edited') and not eobj.cw_edited.saved:
+            eobj.cw_edited[self._attrname] = value
+        else:
+            eobj.cw_attr_cache[self._attrname] = value
 
 
 class Relation(object):