Fixed execution problems for subflows related to multiple executions and missing execution argument

This commit is contained in:
frikky
2022-01-06 03:11:13 +01:00
parent a900b5aa71
commit c41b4da5f5
13 changed files with 233 additions and 172 deletions
+3 -3
View File
@@ -1488,7 +1488,7 @@ class AppBase:
# Means it's a single item -> continue
if seconditem == "":
print("[INFO] In first - handling %s. Len: %d" % (firstitem, len(basejson)))
if firstitem.lower() == "max" or firstitem.lower() == "last":
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
@@ -1503,14 +1503,14 @@ 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":
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)
if seconditem.lower() == "max" or seconditem.lower() == "last":
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