changeset 3863:c04f5e8a3568

plugin pubsub cache: replace empty list by None in `getItemsFromCache`: if an empty list is used, no item can be retrieved, this patch replace empty list by None to avoid this case.
author Goffi <goffi@goffi.org>
date Wed, 20 Jul 2022 17:46:58 +0200
parents 100dd30244c6
children ac255a0fbd4c
files sat/plugins/plugin_pubsub_cache.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sat/plugins/plugin_pubsub_cache.py	Wed Jul 20 17:41:44 2022 +0200
+++ b/sat/plugins/plugin_pubsub_cache.py	Wed Jul 20 17:46:58 2022 +0200
@@ -508,7 +508,7 @@
         if max_items is None and rsm_request is None:
             max_items = 20
             pubsub_items, metadata = await self.host.memory.storage.getItems(
-                node, max_items=max_items, item_ids=item_ids,
+                node, max_items=max_items, item_ids=item_ids or None,
                 order_by=extra.get(C.KEY_ORDER_BY)
             )
         elif max_items is not None: