changeset 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 56e5b18f4d06
children 818db4ca3717
files sat/plugins/plugin_comp_ap_gateway/http_server.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
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"]: