@@ -3726,7 +3726,7 @@ func GetOrg(ctx context.Context, id string) (*Org, error) {
37263726 if err := project .Dbclient .Get (ctx , key , curOrg ); err != nil {
37273727 log .Printf ("[ERROR] Error in org loading (2) for %s: %s" , key , err )
37283728 //log.Printf("Users: %s", curOrg.Users)
3729- if strings .Contains (err .Error (), `cannot load field` ) && strings .Contains (err .Error (), `users` ) {
3729+ if strings .Contains (err .Error (), `cannot load field` ) && strings .Contains (err .Error (), `users` ) && ! strings . Contains ( err . Error (), `users_last_session` ) {
37303730 //Self correcting Org handler for user migration. This may come in handy if we change the structure of private apps later too.
37313731 log .Printf ("[INFO] Error in org loading (3). Migrating org to new org and user handler (2): %s" , err )
37323732 err = nil
@@ -8000,6 +8000,11 @@ func SetWorkflow(ctx context.Context, workflow Workflow, id string, optionalEdit
80008000 // Handles parent/child workflow relationships
80018001 if len (workflow .ParentWorkflowId ) > 0 {
80028002 DeleteCache (ctx , fmt .Sprintf ("workflow_%s_childworkflows" , workflow .ID ))
8003+ DeleteCache (ctx , fmt .Sprintf ("workflow_%s_childworkflows" , workflow .ParentWorkflowId ))
8004+ }
8005+
8006+ if len (workflow .ChildWorkflowIds ) > 0 {
8007+ DeleteCache (ctx , fmt .Sprintf ("workflow_%s_childworkflows" , workflow .ID ))
80038008 }
80048009
80058010 if project .CacheDb {
0 commit comments