#266: Fixed key:value store for options with ||

This commit is contained in:
frikky
2021-02-21 17:42:02 +01:00
parent 04e8a22a71
commit 096bfbca73
2 changed files with 36 additions and 14 deletions
+14
View File
@@ -1423,6 +1423,20 @@ class AppBase:
for parameter in action["parameters"]:
counter += 1
# Hack for key:value in options using ||
try:
if parameter["options"] != None and len(parameter["options"]) > 0:
#print(f'OPTIONS: {parameter["options"]}')
#print(f'OPTIONS VAL: {parameter}')
if "||" in parameter["value"]:
splitvalue = parameter["value"].split("||")
if len(splitvalue) > 1:
print(f'[INFO] Parsed split || options of actions["parameters"]["name"]')
action["parameters"][counter]["value"] = splitvalue[1]
except (IndexError, KeyError, TypeError) as e:
print("Options err: {e}")
if parameter["name"] == "body":
bodyindex = counter
#print("PARAM: %s" % parameter)