dont get eid from entity's dict stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 24 Mar 2010 14:17:01 +0100
branchstable
changeset 4994 108bb7f2a171
parent 4993 c9229f185690
child 4995 1817b87c7f67
dont get eid from entity's dict
web/views/xmlrss.py
--- a/web/views/xmlrss.py	Wed Mar 24 14:12:47 2010 +0100
+++ b/web/views/xmlrss.py	Wed Mar 24 14:17:01 2010 +0100
@@ -50,11 +50,14 @@
         self.w(u'<%s>\n' % (entity.e_schema))
         for rschema, attrschema in entity.e_schema.attribute_definitions():
             attr = rschema.type
-            try:
-                value = entity[attr]
-            except KeyError:
-                # Bytes
-                continue
+            if attr == 'eid':
+                value = entity.eid
+            else:
+                try:
+                    value = entity[attr]
+                except KeyError:
+                    # Bytes
+                    continue
             if value is not None:
                 if attrschema == 'Bytes':
                     from base64 import b64encode