# HG changeset patch # User Goffi # Date 1612807289 -3600 # Node ID 454f61a32427e2782a64370522b3123d0cf09e78 # Parent 80aca1cf1543ae28efa3697dd6bb98a17356ef9e backend: fixed item retractation notification diff -r 80aca1cf1543 -r 454f61a32427 sat_pubsub/backend.py --- a/sat_pubsub/backend.py Thu Feb 04 11:10:24 2021 +0100 +++ b/sat_pubsub/backend.py Mon Feb 08 19:01:29 2021 +0100 @@ -1205,7 +1205,7 @@ items_data = await node.getItemsById(None, True, itemIdentifiers) # Remove the items and keep only actually removed ones in items_data removed = await node.removeItems(itemIdentifiers) - retracted_items = [ + retracted_items_data = [ item_data for item_data in items_data if item_data.item["id"] in removed ] if nodeIdentifier.startswith(const.FDP_TEMPLATE_PREFIX): @@ -1232,9 +1232,9 @@ submitted_node.setSchema(current_schema) if notify: - await self._doNotifyRetraction(retracted_items, node, pep, recipient) + self._doNotifyRetraction(retracted_items_data, node, pep, recipient) - return retracted_items + return [r.item for r in retracted_items_data] def _doNotifyRetraction(self, items_data, node, pep, recipient): self.dispatch({'items_data': items_data,