[bfss, migration] fix storage migration (closes #2189206) oldstable
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Tue, 14 Feb 2012 15:14:22 +0100
brancholdstable
changeset 8231 1bb43e31032d
parent 8176 eff4fe02ec64
child 8232 8c29253105ba
child 8462 a14b6562082b
[bfss, migration] fix storage migration (closes #2189206) The storage migration intend to clean the attributes cache but in practice it was trying to discard attribut edition. As no attribut were edited this lead to a crash.
server/migractions.py
--- a/server/migractions.py	Thu Jan 19 12:57:02 2012 +0100
+++ b/server/migractions.py	Tue Feb 14 15:14:22 2012 +0100
@@ -1412,7 +1412,7 @@
             getattr(entity, attribute)
             storage.migrate_entity(entity, attribute)
             # remove from entity cache to avoid memory exhaustion
-            del entity[attribute]
+            del entity.cw_attr_cache[attribute]
             pb.update()
         print
         source.set_storage(etype, attribute, storage)