More App SDK fixes around indexing in recursions, and another workflow config handler fix

This commit is contained in:
frikky
2022-01-26 17:21:33 +01:00
parent 7b673ccdb4
commit 2f324e6862
12 changed files with 68 additions and 45 deletions
+18 -8
View File
@@ -1010,8 +1010,12 @@ class AppBase:
}
# Simple validation of parameters in general
replace_params = False
try:
tmp_parameters = action["parameters"]
for param in tmp_parameters:
if param["value"] == "SHUFFLE_AUTO_REMOVED":
replace_params = True
except KeyError:
action["parameters"] = []
except TypeError:
@@ -1509,17 +1513,23 @@ class AppBase:
newvalue, is_loop = (tmpitem, parsersplit[outercnt+1:])
else:
print("[INFO] In ELSE - handling %s and %s" % (firstitem, seconditem))
if firstitem.lower() == "max" or firstitem.lower() == "last" or firstitem.lower() == "end":
firstitem = len(basejson)-1
elif firstitem.lower() == "min" or firstitem.lower() == "first":
firstitem = 0
if isinstance(firstitem, str):
if firstitem.lower() == "max" or firstitem.lower() == "last" or firstitem.lower() == "end":
firstitem = len(basejson)-1
elif firstitem.lower() == "min" or firstitem.lower() == "first":
firstitem = 0
else:
firstitem = int(firstitem)
else:
firstitem = int(firstitem)
if seconditem.lower() == "max" or seconditem.lower() == "last" or firstitem.lower() == "end":
seconditem = len(basejson)-1
elif seconditem.lower() == "min" or seconditem.lower() == "first":
seconditem = 0
if isinstance(seconditem, str):
if seconditem.lower() == "max" or seconditem.lower() == "last" or firstitem.lower() == "end":
seconditem = len(basejson)-1
elif seconditem.lower() == "min" or seconditem.lower() == "first":
seconditem = 0
else:
seconditem = int(seconditem)
else:
seconditem = int(seconditem)
+2 -2
View File
@@ -2,7 +2,7 @@ module main
go 1.16
replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared
//replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared
//replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi
//replace github.com/frikky/go-elasticsearch => ../../../../git/go-elasticsearch
@@ -23,7 +23,7 @@ require (
github.com/gorilla/mux v1.8.0
github.com/h2non/filetype v1.1.3
github.com/satori/go.uuid v1.2.0
github.com/shuffle/shuffle-shared v0.1.84
github.com/shuffle/shuffle-shared v0.1.86
go4.org v0.0.0-20201209231011-d4a079459e60 // indirect
golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce
google.golang.org/api v0.65.0