3
0

Prevent envoy from panicking for automation blocks with no references

This commit is contained in:
Tomaž Jerman 2021-12-09 16:41:16 +01:00
parent 59ef8da1ac
commit 047b647af6

View File

@ -159,6 +159,13 @@ outer:
button, _ := b.(map[string]interface{})
auxRef = r.pbAutomation(button)
// In case the block isn't connected to a workflow (placeholder, script)
if auxRef == nil {
r.removeBlock(i)
continue outer
}
// In case we are removing it
if auxRef.equals(ref) {
r.ReplaceRef(ref, nil)
r.WfRefs = r.WfRefs.replaceRef(ref, nil)