diff sat/plugins/plugin_comp_ap_gateway/http_server.py @ 4009:48e8b3dba793

component AP gateway (http/outbox): return data when no RSM is available
author Goffi <goffi@goffi.org>
date Thu, 16 Mar 2023 15:56:11 +0100
parents 54a6b44f173b
children 4ef473116499
line wrap: on
line diff
--- a/sat/plugins/plugin_comp_ap_gateway/http_server.py	Thu Mar 16 12:33:33 2023 +0100
+++ b/sat/plugins/plugin_comp_ap_gateway/http_server.py	Thu Mar 16 15:56:11 2023 +0100
@@ -722,6 +722,10 @@
             "orderedItems": ordered_items
         }
 
+        if "rsm" not in metadata:
+            # no RSM available, we return what we have
+            return ret_data
+
         # AP OrderedCollection must be in reversed chronological order, thus the opposite
         # of what we get with RSM (at least with Libervia Pubsub)
         if not metadata["complete"]: