From 348ca4d2cb3a0f2de47cdb0a635319ac75e8c78c Mon Sep 17 00:00:00 2001 From: Goffi Date: Fri, 19 Jun 2020 15:38:17 +0200 Subject: [PATCH] plugin list of interests: added `id` to data + fixed key conflict: fixed conflict between interest namespace and files namespace. --- sat/plugins/plugin_exp_list_of_interest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sat/plugins/plugin_exp_list_of_interest.py b/sat/plugins/plugin_exp_list_of_interest.py index a161b236..d57f3faa 100644 --- a/sat/plugins/plugin_exp_list_of_interest.py +++ b/sat/plugins/plugin_exp_list_of_interest.py @@ -190,7 +190,7 @@ class ListInterest(object): def _listInterestsSerialise(self, interests_data): interests = [] for item_elt in interests_data[0]: - interest_data = {} + interest_data = {"id": item_elt['id']} interest_elt = item_elt.interest if interest_elt.hasAttribute('namespace'): interest_data['namespace'] = interest_elt.getAttribute('namespace') @@ -219,7 +219,7 @@ class ListInterest(object): }) if elt.hasAttribute('type'): interest_data['subtype'] = elt['type'] - for attr in ('namespace', 'path'): + for attr in ('files_namespace', 'path'): if elt.hasAttribute(attr): interest_data[attr] = elt[attr] else: