Skip to content

Commit

Permalink
Added reference org mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
frikky committed Mar 20, 2024
1 parent 5088006 commit 2ccf572
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions db-connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -5595,6 +5595,16 @@ func GetPrioritizedApps(ctx context.Context, user User) ([]WorkflowApp, error) {
}
*/

// Check if one is referenceOrg not
if dedupedApps[replaceIndex].ReferenceOrg == user.ActiveOrg.Id {
continue
}

if app.ReferenceOrg == user.ActiveOrg.Id {
dedupedApps[replaceIndex] = app
continue
}

if app.Edited > dedupedApps[replaceIndex].Edited {
//log.Printf("[INFO] Replacing deduped app with newer app in get apps: %s", app.Name)
dedupedApps[replaceIndex] = app
Expand Down

0 comments on commit 2ccf572

Please sign in to comment.