changeset 296:6ce33757d21e

backend: fixes RSM for "unrestricted" mode
author souliane <souliane@mailoo.org>
date Thu, 10 Sep 2015 15:02:03 +0200
parents bed30cef11a8
children 4115999d85e9
files sat_pubsub/backend.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sat_pubsub/backend.py	Thu Aug 20 14:06:49 2015 +0200
+++ b/sat_pubsub/backend.py	Thu Sep 10 15:02:03 2015 +0200
@@ -671,7 +671,11 @@
 
 
         def render(result):
-            items = [elt for elt in elts if elt.name == 'item']
+            try:
+                items = [elt for elt in elts if elt.name == 'item']
+            except AttributeError:
+                # XXX: see sat_pubsub.pgsql_storage.LeafNode.getItemsById return value
+                items = [elt[0] for elt in elts if elt[0].name == 'item']
             if len(items) > 0:
                 if response.index is None:
                     if request.before == '': # last page