BUG: Fixed issue with wrong owner of workflow for file uploads

This commit is contained in:
frikky
2020-12-06 17:55:50 +01:00
parent cb01fd2cc7
commit 7474ad4ced
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -2258,7 +2258,10 @@ func saveWorkflow(resp http.ResponseWriter, request *http.Request) {
// FIXME: Is this too drastic? May lead to issues in the future.
// Should maybe make a copy for the old org.
if workflow.OrgId != user.ActiveOrg.Id {
log.Printf("[WARNING] Editing workflow to be owned by %s", user.ActiveOrg.Id)
workflow.OrgId = user.ActiveOrg.Id
workflow.ExecutingOrg = user.ActiveOrg
workflow.Org = append(workflow.Org, user.ActiveOrg)
}
err = setWorkflow(ctx, workflow, fileId)