changeset 290:9f612fa19eea

backend: fixed a crash when there is no RSM in request
author Goffi <goffi@goffi.org>
date Mon, 04 May 2015 18:33:01 +0200
parents f08f8536cab8
children 61fb4817b77f
files sat_pubsub/backend.py
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/sat_pubsub/backend.py	Sat Apr 18 00:15:01 2015 +0200
+++ b/sat_pubsub/backend.py	Mon May 04 18:33:01 2015 +0200
@@ -1082,10 +1082,7 @@
     def items(self, request):
         ext_data = {}
         if const.FLAG_ENABLE_RSM:
-            rsm_ = rsm.RSMRequest.parse(request.element.pubsub)
-            if not rsm_:
-                rsm_ = rsm.RSMRequest(const.VAL_RSM_MAX_DEFAULT)
-            ext_data['rsm'] = rsm_
+            ext_data['rsm'] = request.rsm
         d = self.backend.getItems(request.nodeIdentifier,
                                   request.sender,
                                   request.maxItems,