From cfb074d8981c0d5410c55a6094f9458ef1f9d100 Mon Sep 17 00:00:00 2001 From: frikky Date: Fri, 2 Oct 2020 04:45:14 +0200 Subject: [PATCH] Fixed instaloop autocomplete --- backend/app_sdk/app_base.py | 8 ++++---- backend/go-app/walkoff.go | 1 - frontend/src/views/AngularWorkflow.jsx | 5 ++++- frontend/src/views/Apps.jsx | 21 +++++++++++++++++---- 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/backend/app_sdk/app_base.py b/backend/app_sdk/app_base.py index 7d162334..3fc01232 100644 --- a/backend/app_sdk/app_base.py +++ b/backend/app_sdk/app_base.py @@ -391,14 +391,14 @@ class AppBase: return newvalue, True elif len(actualitem) > 0: # FIXME: This is absolutely not perfect. - print("IN HERE: ", actualitem) + print("In recursion v2: ", actualitem) newvalue = [] firstitem = actualitem[0][0] seconditem = actualitem[0][1] if seconditem == "": print("In first") - basejson = basejson[int(firstitem)] + newvalue = basejson[int(firstitem)] else: if seconditem == "max": seconditem = len(basejson) @@ -868,7 +868,7 @@ class AppBase: actionname = action["name"] #print("Multicheck ", actualitem) print("Actual item: %s" % actualitem) - print("ITEM: %d" % len(actualitem)) + print("LENGTH: %d" % len(actualitem)) if len(actualitem) > 0: multiexecution = True @@ -985,7 +985,7 @@ class AppBase: print("KeyError: %s" % e) baseparams[key] = "KeyError: %s" % e - #print("Running with params %s" % baseparams) + print("Running with params %s" % baseparams) ret = await func(**baseparams) if isinstance(ret, dict) or isinstance(ret, list): results.append(ret) diff --git a/backend/go-app/walkoff.go b/backend/go-app/walkoff.go index adb3a66c..786a9b3b 100644 --- a/backend/go-app/walkoff.go +++ b/backend/go-app/walkoff.go @@ -3117,7 +3117,6 @@ func getSpecificWorkflow(resp http.ResponseWriter, request *http.Request) { //} else { // //log.Printf("Set cache for %s", item.Key) //} - log.Println(workflow.IsValid) resp.WriteHeader(200) resp.Write(body) diff --git a/frontend/src/views/AngularWorkflow.jsx b/frontend/src/views/AngularWorkflow.jsx index 126125de..33f9b67f 100644 --- a/frontend/src/views/AngularWorkflow.jsx +++ b/frontend/src/views/AngularWorkflow.jsx @@ -2513,6 +2513,10 @@ const AngularWorkflow = (props) => { // Look for the ID const found = false for (var key in workflowExecutions) { + if (workflowExecutions[key].results === undefined || workflowExecutions[key].results === null) { + continue + } + const foundResult = workflowExecutions[key].results.find(result => result.action.id === item.id) if (foundResult === undefined) { continue @@ -3939,7 +3943,6 @@ const AngularWorkflow = (props) => {