Skip to content

Commit 07b14f6

Browse files
committed
Fix for [sc-257503]
1 parent 1cf91d8 commit 07b14f6

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

python-lib/dku_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111

1212
def get_dku_key_values(endpoint_query_string):
13+
return {key_value.get("from"): key_value.get("to") for key_value in endpoint_query_string if key_value.get("from")}
14+
15+
16+
def get_dku_duplicated_key_values(endpoint_query_string):
1317
result = defaultdict(list)
1418
for kv in endpoint_query_string:
1519
if kv.get('from') and kv.get('to'):

python-lib/rest_api_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from pagination import Pagination
55
from safe_logger import SafeLogger
66
from loop_detector import LoopDetector
7-
from dku_utils import get_dku_key_values, template_dict, format_template, is_reponse_xml, xml_to_json
7+
from dku_utils import get_dku_key_values, get_dku_duplicated_key_values, template_dict, format_template, is_reponse_xml, xml_to_json
88
from dku_constants import DKUConstants
99
from rest_api_auth import get_auth
1010

@@ -196,7 +196,7 @@ def set_metadata(self, metadata_name, value):
196196

197197
@staticmethod
198198
def get_params(endpoint_query_string, keywords, allow_list=False):
199-
templated_query_string = get_dku_key_values(endpoint_query_string)
199+
templated_query_string = get_dku_duplicated_key_values(endpoint_query_string)
200200
ret = {}
201201
for key in templated_query_string:
202202
ret.update({key: format_template(templated_query_string.get(key, ""), allow_list=allow_list, **keywords) or ""})

0 commit comments

Comments
 (0)