Skip to content

Commit

Permalink
CU-2hj64mr - Fix an online issue about v1 APIs.
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-yu-2013 authored and stiartsly committed May 12, 2022
1 parent 814a5d3 commit 1d4847b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions hive/util/did_scripting.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


def massage_keys_with_dollar_signs(d):
for key, value in d.items():
for key, value in d.copy().items():
if key[0] == "$" and key not in [SCRIPTING_EXECUTABLE_CALLER_DID, SCRIPTING_EXECUTABLE_CALLER_APP_DID,
SCRIPTING_EXECUTABLE_PARAMS]:
d[key.replace("$", "'$'")] = d.pop(key)
Expand All @@ -31,7 +31,7 @@ def massage_keys_with_dollar_signs(d):


def unmassage_keys_with_dollar_signs(d):
for key, value in d.items():
for key, value in d.copy().items():
if key[0:3] == "'$'":
d[key.replace("'$'", "$")] = d.pop(key)
if type(value) is dict:
Expand Down Expand Up @@ -70,7 +70,7 @@ def populate_with_params_values(did, app_did, options, params):
if not options or not params:
return None

for key, value in options.items():
for key, value in options.copy().items():
if isinstance(value, dict):
populate_with_params_values(did, app_did, value, params)
elif isinstance(value, str):
Expand Down
6 changes: 3 additions & 3 deletions src/utils_v1/did_scripting.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


def massage_keys_with_dollar_signs(d):
for key, value in d.items():
for key, value in d.copy().items():
if key[0] == "$" and key not in [SCRIPTING_EXECUTABLE_CALLER_DID, SCRIPTING_EXECUTABLE_CALLER_APP_DID,
SCRIPTING_EXECUTABLE_PARAMS]:
d[key.replace("$", "'$'")] = d.pop(key)
Expand All @@ -18,7 +18,7 @@ def massage_keys_with_dollar_signs(d):


def unmassage_keys_with_dollar_signs(d):
for key, value in d.items():
for key, value in d.copy().items():
if key[0:3] == "'$'":
d[key.replace("'$'", "$")] = d.pop(key)
if type(value) is dict:
Expand Down Expand Up @@ -77,7 +77,7 @@ def populate_with_params_values(did, app_did, options, params):
if not options or not params:
return None

for key, value in options.items():
for key, value in options.copy().items():
if isinstance(value, dict):
populate_with_params_values(did, app_did, value, params)
elif isinstance(value, str):
Expand Down

0 comments on commit 1d4847b

Please sign in to comment.