[session cache] always append to description, turn it into a list if necessary stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 11 Aug 2009 18:13:33 +0200
branchstable
changeset 2781 4e1ad9d6a3e7
parent 2780 ad1dfc3855b0
child 2782 998f24dabd0d
child 2783 493f527aed1e
[session cache] always append to description, turn it into a list if necessary
server/session.py
--- a/server/session.py	Tue Aug 11 17:51:48 2009 +0200
+++ b/server/session.py	Tue Aug 11 18:13:33 2009 +0200
@@ -114,8 +114,9 @@
         if rcache is not None:
             rset, entities = rcache
             rset.rows.append([targeteid])
-            if isinstance(rset.description, list): # else description not set
-                rset.description.append([self.describe(targeteid)[0]])
+            if not isinstance(rset.description, list): # else description not set
+                rset.description = list(rset.description)
+            rset.description.append([self.describe(targeteid)[0]])
             rset.rowcount += 1
             targetentity = self.entity_from_eid(targeteid)
             entities.append(targetentity)