#152: Fixed null pointer issue when apps are not installed

This commit is contained in:
frikky
2020-09-17 19:45:08 +02:00
parent 35d7fb4aa0
commit c4ed881b46
4 changed files with 23 additions and 21 deletions
+1 -1
View File
@@ -460,7 +460,7 @@ class AppBase:
baseresult = ""
actionname_lower = actionname.lower()
try:
if actionname_lower == "exec" || actionname_lower == "webhook" || actionname_lower == "schedule" || actionname_lower == "userinput" || actionname_lower == "email_trigger" || actionname_lower == "trigger":
if actionname_lower == "exec" or actionname_lower == "webhook" or actionname_lower == "schedule" or actionname_lower == "userinput" or actionname_lower == "email_trigger" or actionname_lower == "trigger":
baseresult = execution_data["execution_argument"]
else:
for result in execution_data["results"]:
+4 -5
View File
@@ -404,11 +404,10 @@ func makePythoncode(swagger *openapi3.Swagger, name, url, method string, paramet
bodyAddin,
verifyAddin,
)
if strings.Contains(functionname, "get_returns_the_vuln") {
log.Println(data)
log.Printf("Queries: %s", queryString)
}
//if strings.Contains(functionname, "get_returns_the_vuln") {
// log.Println(data)
// log.Printf("Queries: %s", queryString)
//}
//log.Printf(data)
return functionname, data
+1
View File
@@ -1916,6 +1916,7 @@ func abortExecution(resp http.ResponseWriter, request *http.Request) {
return
}
// FIXME: Check the execution if this fails.
user, err := handleApiAuthentication(resp, request)
if err != nil {
log.Printf("Api authentication failed in abort workflow: %s", err)
+17 -15
View File
@@ -542,22 +542,24 @@ const Workflows = (props) => {
</div>
</Grid>
</Grid>
<Grid container style={{maxWidth: 35, marginRight: 10,}}>
<Tooltip title={`Actions: ${data.actions.length}`} placement="right">
<AppsIcon style={{width: imgSize, height: imgSize}} />
</Tooltip>
{data.actions !== undefined && data.actions !== null ?
<Grid container style={{maxWidth: 35, marginRight: 10,}}>
<Tooltip title={`Actions: ${data.actions.length}`} placement="right">
<AppsIcon style={{width: imgSize, height: imgSize}} />
</Tooltip>
{webhooks > 0 ?
<Tooltip title={`Webhooks: ${webhooks}`} placement="right">
<img alt={data.title} style={{width: imgSize, height: imgSize, marginTop: 5}} src={webhookImg} />
</Tooltip>
: null}
{schedules > 0 ?
<Tooltip title={`Schedules: ${schedules}`} placement="right">
<img alt={data.title} style={{width: imgSize, height: imgSize, marginTop: 5}} src={scheduleImg} />
</Tooltip>
: null}
</Grid>
{webhooks > 0 ?
<Tooltip title={`Webhooks: ${webhooks}`} placement="right">
<img alt={data.title} style={{width: imgSize, height: imgSize, marginTop: 5}} src={webhookImg} />
</Tooltip>
: null}
{schedules > 0 ?
<Tooltip title={`Schedules: ${schedules}`} placement="right">
<img alt={data.title} style={{width: imgSize, height: imgSize, marginTop: 5}} src={scheduleImg} />
</Tooltip>
: null}
</Grid>
: null}
</Paper>
)
}